Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # CONF
- DBG=true
- RELOG_UNAME="usernamehere"
- RELOG_PASSW="passwordhere"
- # END CONF
- IS_LOGGED_IN=$(wget "https://www.btopenzone.com:8443/home" --no-check-certificate --no-cache --timeout 30 -O - 2>/dev/null | grep "now logged in")
- if [ "$IS_LOGGED_IN" ]
- then
- $DBG && echo "Currently logged in. Nothing to do... :)"
- $DBG && logger -t "logon_fon" "Currently logged in. Nothing to do... :)"
- else
- $DBG && echo "You're not logged in... will log in now!"
- $DBG && logger -t "logon_fon" "You're not logged in... will log in now!"
- OUT=$(wget -qO - --no-check-certificate --no-cache --post-data "username=$RELOG_UNAME&password=$RELOG_PASSW" "https://www.btopenzone.com:8443/ante")
- ONLINE=$(echo $OUT | grep "now logged on" )
- if [ "$ONLINE" ]
- then
- $DBG && echo "You're online!"
- $DBG && logger -t "logon_fon" "You're online!"
- else
- $DBG && echo "Could not login :("
- $DBG && logger -t "logon_fon" "Could not login :("
- fi
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement