OESF Portables Forum
Everything Else => General Support and Discussion => Zaurus General Forums => Archived Forums => Security and Networking => Topic started by: patzoul on May 29, 2010, 04:53:53 am
-
I have the following script to connect to a wifi network that will allow me to automatically input the login and password on a webpage. Where should I put this script so that it launches automatically?
script:
#!/bin/sh
CURL=`which curl`
login=SAISIR LOGIN
password=SAISIR MOT DE PASSE
IWGETID=`which iwgetid`
ESSID="FreeWifi"
isFreeWifi="`$IWGETID |grep $ESSID |wc -l`"
if [ $isFreeWifi = "1" ]
then
priv=`$CURL https://wifi.free.fr/ (https://wifi.free.fr/) |grep "<input name=\"priv\" id=\"priv\" type=\"hidden\"" | sed -e 's/^.*value=\"\(.*\)\"\s.*/\1/'`
$CURL -d "login=$login&password=$password&priv=$priv&submit=Valider&url=http://www.free.fr" https://wifi.free.fr/ (https://wifi.free.fr/)
espeak "FreeWifi network connected"
fi
-
I think it depends on what you want to have trigger the automatic launch.
It would also help if you specified your model and ROM.
sdjf
-
I think it depends on what you want to have trigger the automatic launch.
It would also help if you specified your model and ROM.
sdjf
I have a Zaurus C760 running Cacko 1.23. I would like the script to run when I select this Wifi connection in the Network app.
-
I have a Zaurus C760 running Cacko 1.23. I would like the script to run when I select this Wifi connection in the Network app.
1. Change your script so that it is safe to run when you connect to any network
2. Write a small program to listen for the qcop signal QPE/Network/up() and run your script when it is received.
qcop (https://www.oesf.org/index.php?title=Sharp_Qtopia_QCop_Messages)