#!/bin/bash | |
# CONF | |
DBG=true | |
RELOG_UNAME=your@email.com | |
RELOG_PASSW=xxxxxxxxxxxxxxx | |
# END CONF | |
IS_LOGGED_IN=$(wget "https://www.btopenzone.com:8443/home" --timeout 30 -O - 2>/dev/null | grep "accountLogoff") | |
if [ "$IS_LOGGED_IN" ] | |
then | |
[[ $DBG ]] && echo "currently logged in. Nothing to do.." | |
else | |
[[ $DBG ]] && echo "It's not logged in.. Will log in!" | |
OUT=$(wget -qO- --post-data "USERNAME=$RELOG_UNAME&PASSWORD=$RELOG_PASSW" "https://btwifi.portal.fon.com/remote?res=hsp-login&HSPNAME=FonBT%3AGB&WISPURL=https%3A%2F%2Fwww.btopenzone.com%3A8443%2FfonLogon&WISPURLHOME=https%3A%2F%2Fwww.btopenzone.com%3A8443&VNPNAME=FonBT%3AGB&LOCATIONNAME=FonBT%3AGB") | |
ONLINE=$(echo $OUT | grep youre_online ) | |
if [ "$ONLINE" ] | |
then | |
[[ $DBG ]] && echo "You're online!" | |
else | |
[[ $DBG ]] && echo "Could not login :(" | |
fi | |
fi |
not entirely sure will try targeting 32 bit specifically, current timings are coded as follows,
IF NO INTERNET = ping (500ms timeout), wait (500ms), Ping (500ms Timeout), Run Selected Login
IF INTERNET Ping (Timeout Not Relevant), Wait (1000ms), Loop Back To Ping
not entirely sure will try targeting 32 bit specifically, current timings are coded as follows, IF NO INTERNET = ping (500ms timeout), wait (500ms), Ping (500ms Timeout), Run Selected Login IF INTERNET Ping (Timeout Not Relevant), Wait (1000ms), Loop Back To Ping
I don't think anyone still uses 32-bit, do they? Not sure why mine (x64) won't run it, to be honest, but then I haven't reformatted and reinstalled for years (used to do it every 6 months) so Windows has probably accumulated a whole load of icky stuff that gets in the way...
The timing thing: I meant between checks, sorry. I have my current batch going every 2 minutes or so, which can give a fair bit of downtime if the network's rubbish but avoids getting things piled up with constant checks!
not entirely sure will try targeting 32 bit specifically, current timings are coded as follows, IF NO INTERNET = ping (500ms timeout), wait (500ms), Ping (500ms Timeout), Run Selected Login IF INTERNET Ping (Timeout Not Relevant), Wait (1000ms), Loop Back To Ping
I don't think anyone still uses 32-bit, do they? Not sure why mine (x64) won't run it, to be honest, but then I haven't reformatted and reinstalled for years (used to do it every 6 months) so Windows has probably accumulated a whole load of icky stuff that gets in the way... The timing thing: I meant between checks, sorry. I have my current batch going every 2 minutes or so, which can give a fair bit of downtime if the network's rubbish but avoids getting things piled up with constant checks!
ahh its set to loop so if first test passes waits 1 second and runs the same single packet ping again :)
EDIT: v4 Windows Exe Now Available
https://github.com/aidanmacgregor/BT_Wi-fi_Autologin_-_OpenWrt_Windows.EXE_Linux_Chrome-OS_Android-Macrodroid
@aidanmacgregor also now using your script (OpenWRT service). Nice work, thank you! Though I swapped the config over to /etc/btwifi.conf
since I'm not sure what owns rc.local
on OpenWRT.
@aidanmacgregor also now using your script (OpenWRT service). Nice work, thank you! Though I swapped the config over to
/etc/btwifi.conf
since I'm not sure what ownsrc.local
on OpenWRT.
Hey Awesome! Glad its Working Well For You, and i was under impression nothing touched it besides from the user :)
Well, that's odd... I ran the .NET 4.6 updater and apparently I already have 4.7.2. "Repaired" that but it still won't run. Says I need to check whether I need x32 or x64 (I assume it's an x64 exe). Gah!