btauth --user USER_OR_EMAIL --pass PASSWORD # To Authenticate with the BT WiFi
btmaintain --user USER_OR_EMAIL --pass PASSWORD # To maintain a connection and re-authenticate automatically
nohup btmaintain --user USER_OR_EMAIL --pass PASSWORD 2>&1 >/dev/null & # Same as above but ran in background
This will check whether you lost connectivity by pinging
google.com
every 1
second. If you are not it will check whether
the SSL certificate of google.com had been replaced with a BT WiFi
certificate and re-authenticate you via btauth
.
Download or copy both scripts to /usr/local/bin
and give them execute permissions:
mkdir -p /usr/local/bin
curl -sSL https://goo.gl/2gto0U > /usr/local/bin/btauth
chmod +x /usr/local/bin/btauth
curl -sSL https://goo.gl/07sNF1 > /usr/local/bin/btmaintain
chmod +x /usr/local/bin/btmaintain
BTAuth Copyright (C) 2015 Itay Grudev
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
See http://www.gnu.org/licenses/ for the full text of the GNU General Public License.
Thanks for getting back to me. I managed to get the other script I mentioned working which uses wget rather than curl. You were right, the form had changed and by inspecting the webpage it could be seen that the login url was different for BT WIFI.
BT broadband logins still use 'https://www.btopenzone.com:8443/tbbLogon' however there was a new URL: 'https://www.btwifi.com:8443/ante' for the BT Wifi logins.