Skip to content

Instantly share code, notes, and snippets.

@grkvlt
Created February 10, 2026 18:05
Show Gist options
  • Select an option

  • Save grkvlt/48775917ebe012dc020d7c8cf0153b7c to your computer and use it in GitHub Desktop.

Select an option

Save grkvlt/48775917ebe012dc020d7c8cf0153b7c to your computer and use it in GitHub Desktop.
EE WiFi Captive Portal Automatic Login
#!/usr/bin/bash
#
# EE WiFi Captive Portal Automatic Login
#
# https://github.com/aidanmacgregor/EE_WiFi-BT_WiFi-Autologin-OpenWRT
#
# Original-Author: Aidan Macgregor
# Author: Andrew Kennedy
# Created: October 2023
# Updated: February 2026
# Account Types
# 1 = BT Home Broadband
# 2 = BT Buisness Broadband
# 3 = BT Wi-Fi Account
# SETTINGS
ACCOUNTTYPE="1"
USERNAME="andrew.international@gmail.com"
PASSWORD="1111qqqq@@"
SLEEP="300"
# EE WiFi auth API endpoint
ENDPOINT="ee-wifi.ee.co.uk"
DNSSERVER="8.8.8.8"
PIDFILE="/var/run/ee-autologin.pid"
start() {
if [ -f ${PIDFILE} && -d /proc/$(cat ${PIDFILE}) ] ; then
exit 1
fi
ENDPOINT_IP=$(nslookup ${ENDPOINT} ${DNSSERVER} | awk -F ': ' 'NR==6 { print $2 } ')
login &
echo "$!" > ${PIDFILE}
}
stop() {
wget --no-check-certificate -T 2 -O /dev/null "https://${ENDPOINT_IP}/accountLogoff/home?confirmed=true"
kill -9 "$(cat ${PIDFILE})"
rm -f ${PIDFILE}
}
login() {
while true ; do
case "${ACCOUNTTYPE}" in
1) wget --no-check-certificate -T 2 -O /dev/null --post-data "username=$USERNAME&password=$PASSWORD" "https://${ENDPOINT_IP}/tbbLogon"
;;
2) wget --no-check-certificate -T 2 -O /dev/null --post-data "username=$USERNAME&password=$PASSWORD" "https://${ENDPOINT_IP}/ante?partnerNetwork=btb"
;;
3) wget --no-check-certificate -T 2 -O /dev/null --post-data "username=$USERNAME&password=$PASSWORD" "https://${ENDPOINT_IP}/ante"
;;
*) exit 1
;;
esac
sleep ${SLEEP}
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment