Skip to content
Snippets Groups Projects
Commit d019c8e1 authored by nimrod's avatar nimrod
Browse files

- Use the Firefox login portal detection service (instead of just trying google.com).

parent 6b5cc373
No related branches found
No related tags found
No related merge requests found
......@@ -61,7 +61,7 @@ iswifi "$interface" || die "Can't login to the train wifi, interface $interface
connection="$(wifi_connection "$interface")"
[ "$connection" = "ISRAEL-RAILWAYS" ] || die "Can't login to the train wifi, wifi network $connection isn't ISRAEL-RAILWAYS."
redirect_url="$(curl --output /dev/null --silent --write-out '%{redirect_url}' http://google.com/)"
redirect_url="$(curl --output /dev/null --silent --write-out '%{redirect_url}' http://detectportal.firefox.com/success.txt)"
logger -p user.debug "Train wifi redirect url: $redirect_url"
login_ip="$(echo "$redirect_url" | grep --only-matching '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*')" || die "Can't login to the train wifi, redirect URL doesn't contain an IP."
logger -p user.debug "Train wifi login IP: $login_ip"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment