Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Define file to store the password temporarily
- TEMPFILE=/tmp/vpnbook_password.tmp
- # Define connection timeout (in seconds)
- TIMEOUT=5
- # Parse the website and save it to the temp file
- wget -q -T $TIMEOUT -O - "http://www.vpnbook.com/freevpn" | grep -m 1 "Password:" > $TEMPFILE
- # Read the temp file, find the password and store it in the variable $PASSWORD
- PASSWORD=$( sed -n -e "s/.*<strong>\(.*\)<\/strong>.*/\1/p" $TEMPFILE )
- # Return the current password
- echo $PASSWORD
- # Delete temp file
- rm $TEMPFILE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement