![]() |
2010-03-04
, 12:10
|
Posts: 1,224 |
Thanked: 1,763 times |
Joined on Jul 2007
|
#2
|
![]() |
2010-03-04
, 12:21
|
Posts: 118 |
Thanked: 59 times |
Joined on May 2007
|
#3
|
![]() |
2010-03-04
, 12:21
|
Posts: 67 |
Thanked: 28 times |
Joined on Oct 2009
@ Switzerland
|
#4
|
I'd like to be able to have a script run automatically when I connect to a wifi network.
It's the main university one and it's one of those which wants me to give my username and password in a web page before I'm allowed proper access to the internet.
The script would be easy -- it'd check which wifi network we just connected to (by SSID, for instance) and then if it matched the uni network it'd just be a simple curl job to send my username and password.
(Come to think of it I haven't even checked if curl's available -- I can work around that if not.)
Does something like this exist? I'm not new to Linux, I'm happy editing system configs and scripts etc.
This is on my new N900.
![]() |
2010-03-04
, 12:28
|
Posts: 376 |
Thanked: 511 times |
Joined on Aug 2009
@ Greece
|
#5
|
I'd like to be able to have a script run automatically when I connect to a wifi network.
[...]
The script would be easy -- it'd check which wifi network we just connected to (by SSID, for instance) and then if it matched the uni network it'd just be a simple curl job to send my username and password.
![]() |
2010-03-04
, 16:57
|
Posts: 53 |
Thanked: 20 times |
Joined on Jan 2010
|
#6
|
/home/user/isslogin.sh * * com.nokia.icd status_changed * WLAN_INFRA
#!/bin/bash USER='--my university username--' PASS='--my university password--' IP=$(ifconfig wlan0 | grep "inet addr" | cut -d : -f 2 | awk '{print $1}') #echo $* >>/home/user/dbus if [ $5 = "d49d3--my university network ID--3e410" -a $7 = "CONNECTED" ]; then wget --no-check-certificate --post-data '_FORM_SUBMIT=1&which_form=reg&destination=http%3A%2F%2Fgoogle.com%2F&source='$IP'&error=&bs_name='$USER'&bs_password='$PASS https://--network login URL--.pl -O /dev/null fi
![]() |
2010-03-04
, 17:06
|
Posts: 1,224 |
Thanked: 1,763 times |
Joined on Jul 2007
|
#7
|
The Following User Says Thank You to Matan For This Useful Post: | ||
![]() |
2010-03-04
, 17:07
|
Posts: 53 |
Thanked: 20 times |
Joined on Jan 2010
|
#8
|
![]() |
2010-07-02
, 15:25
|
Posts: 13 |
Thanked: 4 times |
Joined on Dec 2009
@ France
|
#9
|
![]() |
2011-05-03
, 15:53
|
Posts: 10 |
Thanked: 1 time |
Joined on Mar 2010
|
#10
|
/some/script.sh * * com.nokia.icd status_changed * WLAN_INFRA
/some/script.sh * * com.nokia.icd status_changed * GPRS
It's the main university one and it's one of those which wants me to give my username and password in a web page before I'm allowed proper access to the internet.
The script would be easy -- it'd check which wifi network we just connected to (by SSID, for instance) and then if it matched the uni network it'd just be a simple curl job to send my username and password.
(Come to think of it I haven't even checked if curl's available -- I can work around that if not.)
Does something like this exist? I'm not new to Linux, I'm happy editing system configs and scripts etc.
This is on my new N900.