bash script for openwrt router for auto login in an simple hotspot from NoDogSplash Captive Portal
Budget: €8 – €30 EUR
For openwrt there is the addon travelmate which works very well. There you have the option to store auto login scripts. There are also example scripts and working ones already in the plugin for the largest hotspot providers.
look like this:
# login with credentials
#
raw_html="$("${trm_fetch}" --user-agent "${trm_useragent}" --referer "http://www.example.com" --connect-timeout $((trm_maxwait / 6)) --silent --show-error --header "Content-Type:application/x-www-form-urlencoded" "http://${trm_domain}")"
[ -z "${raw_html##*${success}*}" ] && exit 0 || exit 255
--------------------------------------------------------------------------------------------
My case:
I have a hotspot at work. The page that is accessed is very simple, there is only one button to then go to the internet. It's free internet, no username, no password. only the button has to be pressed.
I just have no idea about HTML etc.
The hotspot uses NoDogSplash Captive Portal, which is very simple. The URL on the login button looks like this:
http://abcdef.box/nodogsplash_auth/?tok=6363721&redir=(null)
What I need:
a fully function auto login script
Information I have for you:
1. The HTML page downloaded as .zip
2. Example scripts that run on github:
https://github.com/openwrt/packages/tree/master/net/travelmate/files
3. Openwrt travelmate info
https://openwrt.org/docs/guide-user/network/wifi/wifiextenders/travelmate#captive_portal_auto-logins
look like this:
# login with credentials
#
raw_html="$("${trm_fetch}" --user-agent "${trm_useragent}" --referer "http://www.example.com" --connect-timeout $((trm_maxwait / 6)) --silent --show-error --header "Content-Type:application/x-www-form-urlencoded" "http://${trm_domain}")"
[ -z "${raw_html##*${success}*}" ] && exit 0 || exit 255
--------------------------------------------------------------------------------------------
My case:
I have a hotspot at work. The page that is accessed is very simple, there is only one button to then go to the internet. It's free internet, no username, no password. only the button has to be pressed.
I just have no idea about HTML etc.
The hotspot uses NoDogSplash Captive Portal, which is very simple. The URL on the login button looks like this:
http://abcdef.box/nodogsplash_auth/?tok=6363721&redir=(null)
What I need:
a fully function auto login script
Information I have for you:
1. The HTML page downloaded as .zip
2. Example scripts that run on github:
https://github.com/openwrt/packages/tree/master/net/travelmate/files
3. Openwrt travelmate info
https://openwrt.org/docs/guide-user/network/wifi/wifiextenders/travelmate#captive_portal_auto-logins