free wifi with web html login page - auto login?

Clash Royale CLAN TAG#URR8PPP up vote
3
down vote
favorite
A place where I visit very regularly had open access free wifi with no password on the wifi SSID
However, it's one of the ones where you can connect to the wifi, but when you try to go to a webpage, it first redirects you to a login page, where you have to put in the username and password.
The username and password very rarely change (i.e. it's not changed for at least a year).
Quite frequently my connection drops and I have to go through the logon process again, is there any way to automate this with a script in Linux?
Thanks
scripts login
add a comment |Â
up vote
3
down vote
favorite
A place where I visit very regularly had open access free wifi with no password on the wifi SSID
However, it's one of the ones where you can connect to the wifi, but when you try to go to a webpage, it first redirects you to a login page, where you have to put in the username and password.
The username and password very rarely change (i.e. it's not changed for at least a year).
Quite frequently my connection drops and I have to go through the logon process again, is there any way to automate this with a script in Linux?
Thanks
scripts login
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
A place where I visit very regularly had open access free wifi with no password on the wifi SSID
However, it's one of the ones where you can connect to the wifi, but when you try to go to a webpage, it first redirects you to a login page, where you have to put in the username and password.
The username and password very rarely change (i.e. it's not changed for at least a year).
Quite frequently my connection drops and I have to go through the logon process again, is there any way to automate this with a script in Linux?
Thanks
scripts login
A place where I visit very regularly had open access free wifi with no password on the wifi SSID
However, it's one of the ones where you can connect to the wifi, but when you try to go to a webpage, it first redirects you to a login page, where you have to put in the username and password.
The username and password very rarely change (i.e. it's not changed for at least a year).
Quite frequently my connection drops and I have to go through the logon process again, is there any way to automate this with a script in Linux?
Thanks
scripts login
asked May 4 at 9:28
icarusbop
213
213
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
You can perform this with the command POST :
POST http://[ADRESS]:[PORT]/ <<< 'auth_user=ID&auth_pass=PASSWORD&accept=Continue'
Then you just have to copy this script in the folder /etc/NetworkManager/dispatcher.d/. When your connect to a network with NetworkManager, it will pass the interface used in $1 and if this is a connect or disconnect in $2 to your script.
#!/bin/bash
if [ "$1 $2" = 'wlan0 up' ]
then
essid=$(iwconfig wlan0 | grep -o 'ESSID:".*$' | sed 's/^ESSID:"(.*)".*$/1/')
case "$essid" in
'Freewifi')
POST http://[ADRESS]:[PORT]/ <<< 'auth_user=ID&auth_pass=PASSWORD&accept=Continue' ;;
'Other')
POST http://[ADRESS]:[PORT] <<< 'accept_cgu=1' ;;
esac
fi
Be aware to fill all required input in your form (sometimes there is security input and that can be really complicated to automate the connexion in a script).
That was a long time ago that I perform an script to perform this and I didn't test it.
Hope this answer help.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
You can perform this with the command POST :
POST http://[ADRESS]:[PORT]/ <<< 'auth_user=ID&auth_pass=PASSWORD&accept=Continue'
Then you just have to copy this script in the folder /etc/NetworkManager/dispatcher.d/. When your connect to a network with NetworkManager, it will pass the interface used in $1 and if this is a connect or disconnect in $2 to your script.
#!/bin/bash
if [ "$1 $2" = 'wlan0 up' ]
then
essid=$(iwconfig wlan0 | grep -o 'ESSID:".*$' | sed 's/^ESSID:"(.*)".*$/1/')
case "$essid" in
'Freewifi')
POST http://[ADRESS]:[PORT]/ <<< 'auth_user=ID&auth_pass=PASSWORD&accept=Continue' ;;
'Other')
POST http://[ADRESS]:[PORT] <<< 'accept_cgu=1' ;;
esac
fi
Be aware to fill all required input in your form (sometimes there is security input and that can be really complicated to automate the connexion in a script).
That was a long time ago that I perform an script to perform this and I didn't test it.
Hope this answer help.
add a comment |Â
up vote
1
down vote
You can perform this with the command POST :
POST http://[ADRESS]:[PORT]/ <<< 'auth_user=ID&auth_pass=PASSWORD&accept=Continue'
Then you just have to copy this script in the folder /etc/NetworkManager/dispatcher.d/. When your connect to a network with NetworkManager, it will pass the interface used in $1 and if this is a connect or disconnect in $2 to your script.
#!/bin/bash
if [ "$1 $2" = 'wlan0 up' ]
then
essid=$(iwconfig wlan0 | grep -o 'ESSID:".*$' | sed 's/^ESSID:"(.*)".*$/1/')
case "$essid" in
'Freewifi')
POST http://[ADRESS]:[PORT]/ <<< 'auth_user=ID&auth_pass=PASSWORD&accept=Continue' ;;
'Other')
POST http://[ADRESS]:[PORT] <<< 'accept_cgu=1' ;;
esac
fi
Be aware to fill all required input in your form (sometimes there is security input and that can be really complicated to automate the connexion in a script).
That was a long time ago that I perform an script to perform this and I didn't test it.
Hope this answer help.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You can perform this with the command POST :
POST http://[ADRESS]:[PORT]/ <<< 'auth_user=ID&auth_pass=PASSWORD&accept=Continue'
Then you just have to copy this script in the folder /etc/NetworkManager/dispatcher.d/. When your connect to a network with NetworkManager, it will pass the interface used in $1 and if this is a connect or disconnect in $2 to your script.
#!/bin/bash
if [ "$1 $2" = 'wlan0 up' ]
then
essid=$(iwconfig wlan0 | grep -o 'ESSID:".*$' | sed 's/^ESSID:"(.*)".*$/1/')
case "$essid" in
'Freewifi')
POST http://[ADRESS]:[PORT]/ <<< 'auth_user=ID&auth_pass=PASSWORD&accept=Continue' ;;
'Other')
POST http://[ADRESS]:[PORT] <<< 'accept_cgu=1' ;;
esac
fi
Be aware to fill all required input in your form (sometimes there is security input and that can be really complicated to automate the connexion in a script).
That was a long time ago that I perform an script to perform this and I didn't test it.
Hope this answer help.
You can perform this with the command POST :
POST http://[ADRESS]:[PORT]/ <<< 'auth_user=ID&auth_pass=PASSWORD&accept=Continue'
Then you just have to copy this script in the folder /etc/NetworkManager/dispatcher.d/. When your connect to a network with NetworkManager, it will pass the interface used in $1 and if this is a connect or disconnect in $2 to your script.
#!/bin/bash
if [ "$1 $2" = 'wlan0 up' ]
then
essid=$(iwconfig wlan0 | grep -o 'ESSID:".*$' | sed 's/^ESSID:"(.*)".*$/1/')
case "$essid" in
'Freewifi')
POST http://[ADRESS]:[PORT]/ <<< 'auth_user=ID&auth_pass=PASSWORD&accept=Continue' ;;
'Other')
POST http://[ADRESS]:[PORT] <<< 'accept_cgu=1' ;;
esac
fi
Be aware to fill all required input in your form (sometimes there is security input and that can be really complicated to automate the connexion in a script).
That was a long time ago that I perform an script to perform this and I didn't test it.
Hope this answer help.
edited May 4 at 10:18
pa4080
12k52255
12k52255
answered May 4 at 9:52
Eraseth
1299
1299
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1031900%2ffree-wifi-with-web-html-login-page-auto-login%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password