What's new

VPNBook-Passwd.com w/ Sample Robot Script for ASUSWRT-Merlin

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

garycnew

Senior Member
All:

As you know, I'm constantly trying to innovate and think outside of the box with solutions. I finally got around to implementing and documenting this project (http://vpnbook-passwd.com/). For those of you whom would prefer to automate the vpnbook.com openvpn client password update, I've registered vpnbook-passwd.com that provides read-only access to my /tmp/etc/openvpn/client1/auth file directly on my router. The process makes use of OCR software to automatically extract the vpnbook.com image password, update my router's openvpn client1/auth configuration, and then makes it available, in plain-text, via vpnbook-passwd.com. (A BIG Shout-out to @Martineau for recommending this process.)

Here is a Sample Robot Script that works specifically with ASUSWRT-Merlin (which can be adopted for other architectures):
Code:
#!/bin/sh

### Robot Installation ###
# mkdir -p /jffs/scripts/vpnbook-passwd.com
# cd /jffs/scripts/vpnbook-passwd.com/
# wget http://vpnbook-passwd.com/robot
# chmod 755 /jffs/scripts/vpnbook-passwd.com/robot

wget=$(/usr/sbin/wget --quiet -O - --no-check-certificate --save-cookies wget-cookies.txt --keep-session-cookies --load-cookies wget-cookies.txt -U "VPNBook-Passwd.com Robot/0.1" http://vpnbook-passwd.com/ | head -2 2>&1 | tee auth)

wget=$(sed -n '2p' auth)

#echo $wget

username=$(nvram get vpn_client1_username)
password=$(nvram get vpn_client1_password)

if [ "$wget" != "" ] && [ "$wget" != "$password" ]; then
   password=$wget

   #echo "#$username#"
   #echo "#$password#"

   nvram set vpn_client_password=$password
   nvram set vpn_client1_password=$password
   nvram commit

   #service restart_vpnclient1
   #service restart_webdav

   echo $password | tee -a history

   #echo -e "Password Changed\n$username\n$password\n" | /usr/sbin/sendmail -S"smtp.domain.com:25" -auusername -appassword -f"noreply@vpnbook-passwd.com" -t 5555555555@txt.att.net

   logger "vpnbook-passwd.com $password"
fi

### ASUSWRT-Merlin service-event Config ###
# touch /jffs/scripts/service-event
# chmod 755 /jffs/scripts/service-event
# if ! grep "#!\/bin\/sh" /jffs/scripts/service-event; then echo "#!/bin/sh" >> /jffs/scripts/service-event; fi
# echo "if echo \"$1\" | grep -i \"start\" && [ \"$2\" = \"vpnclient1\" ]; then" >> /jffs/scripts/service-event
# echo "   /bin/sh /jffs/scripts/vpnbook-passwd.com/robot >/dev/null 2>&1" >> /jffs/scripts/service-event
# echo "fi" >> /jffs/scripts/service-event

I've had something similar to this successfully running for the past year and thought it was mature enough to let out into the wild.

It's always a mystery as to what type of responses I will receive when posting to the ASUSWRT-Merlin forums. Inevitably, someone will mention Security, Honeypots, etc. The fact is, if it's useful to you then have at it. If not, at least be constructive in your criticism. Thank You.

Respectfully,


Gary
 
Last edited:
I don't understand the 'catch'?

As it has been explained so far, this does not sound like a fair trade.
 
vpnbook.com

I personally had to look what vpnbook.com is. So, if I have no service with this guys because of the password, my first action would be to get the new password. How difficult is to update this password manually and how much time it takes? We may have 12h time difference with you.
 
I don't understand the 'catch'?

As it has been explained so far, this does not sound like a fair trade.

The previous response is unconstructive.

A constructive response is kindly teaching you that double quotes are used in quoting an original reference and single quotes are used for quoting an existing quote.

Hope that helps.
 
I personally had to look what vpnbook.com is. So, if I have no service with this guys because of the password, my first action would be to get the new password. How difficult is to update this password manually and how much time it takes? We may have 12h time difference with you.

This is a constructive question.

More than likely, I desire the same VPN to be up and available as much as you do, so it would be in my best interest to have my openvpn-event script configured to text me an alert when the VPN went down and for me to manually update the password for both of us.

It's a simple matter of whether you prefer to set-it-and-forget-it or manually update the VPN password on your own. I take it you prefer the later.
 
For those of you whom would prefer to automate the vpnbook.com openvpn client password update, I've registered vpnbook-passwd.com that provides read-only access to my /tmp/etc/openvpn/client1/auth file directly on my router. The only catch is you have to wait for me to manually update my router prior to your router being updated. Fair trade?
FYI,.....................(and not knocking your altruistic '/etc/openvpn/client1/auth' hosting efforts) auto updating VPNBOOK password has been around since 2014

but when they changed to .img, I've used
vpnbook/password_extractor at master · HiMyNameIsIlNano/vpnbook · GitHub
to extract the password (tweaked the script variable output_file=/tmp/vpnbok_pwd_${timestamp}.json to save the password locally to output_file=/jffs/configs/VPNBOOK.pwd), then used the appropriate event/postconf etc. script to use the new password if it has changed.
 
FYI,.....................(and not knocking your altruistic '/etc/openvpn/client1/auth' hosting efforts) auto updating VPNBOOK password has been around since 2014
I was aware that auto-updating vpnbook.com had been available prior to the password image change. I was not aware of vpnbook/password_extractor. This is even better, if it will run on ASUSWRT-Merlin.
but when they changed to .img, I've used
vpnbook/password_extractor at master · HiMyNameIsIlNano/vpnbook · GitHub
to extract the password (tweaked the script variable output_file=/tmp/vpnbok_pwd_${timestamp}.json to save the password locally to output_file=/jffs/configs/VPNBOOK.pwd), then used the appropriate event/postconf etc. script to use the new password if it has changed.
Do you know whether it's possible to install vpnbook/password_extractor on ASUSWRT-Merlin?

How accurate is vpnbook/password_extractor?

Much Appreciated.


Gary
 
Last edited:
I was aware that auto-updating vpnbook.com had been available prior to the password image change. I was not aware of vpnbook/password_extractor. This is even better, if it will run on ASUSWRT-Merlin.

Do you know whether it's possible to install vpnbook/password_extractor on ASUSWRT-Merlin?
Yes
How accurate is vpnbook/password_extractor?
I only briefly/temporarily use VPNBOOK if my subscription VPN providers show weird transient connection/throughput issues etc. (which is rare) and sometimes when I feel it prudent to test new router firmware releases for vanilla VPN Client compatibility.

Personally, I would say it is very accurate when I have needed to use it, but I do recall it failed a couple of times where it seemed to drop the first character.
 
I would say it is very accurate when I have needed to use it, but I do recall it failed a couple of times where it seemed to drop the first character.
Excellent! I'll install it and give it a try.

Thanks!


Gary
 
I take it you prefer the later.

No, I don't use this service. I mean, with this script password update happens only when you update your router and that may not happen for hours because of the time difference. I get the idea, but the script may not be very useful for people living on the other side of the globe.
 
I mean, with this script password update happens only when you update your router and that may not happen for hours because of the time difference. I get the idea, but the script may not be very useful for people living on the other side of the globe.
What if the vpnbook-passwd.com site is automatically updated by the vpnbook/password_extractor script?
 
The previous response is unconstructive.

A constructive response is kindly teaching you that double quotes are used in quoting an original reference and single quotes are used for quoting an existing quote.

Hope that helps.

No, your response is not constructive. Nor did you answer my queries.

Pointing out my failures in the English language while ignoring me questions is bad form.
 
I've updated the process to make use of OCR software to automatically extract the vpnbook.com image password, update my router's openvpn client1/auth configuration, and then make it available, in plain-text, via vpnbook-passwd.com. (A BIG Shout-out to @Martineau for recommending this process.)
 
Out of curiosity, how does the vpnbook business model work? Is it just funded by ads when you look up a new password?

I have a lifetime with another vpn provider, so my marginal cost is still zero, but free vpn is naturally appealing but unexpected.
 
Out of curiosity, how does the vpnbook business model work? Is it just funded by ads when you look up a new password?

I have a lifetime with another vpn provider, so my marginal cost is still zero, but free vpn is naturally appealing but unexpected.
@elorimer

I assume vpnbook's business model is funded through ad revue, but down know that for fact.

When originally deciding whether to make use of vpnbook, a cursory search resulted in a great deal of speculation including conspiracy theory.

What I do know is that I've used vpnbook for over a year without issue (including torrents).

There are other freevpn services out there, but vpnbook seems like one of the more popular ones.

Respectfully,


Gary
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Top