Mailing List Archive

Automatic website logging to WLAN
Hello,

To access some WLAN I have to login on a webpage with certain credentials. Until I do that all communication is blocked so e-mail or messaging clients can't connect.

Is there a simple way to send such login request from command line / script? It would be ideal if such script was invoked automatically just after connection to this network.

Best regards
Jakub
Re: Automatic website logging to WLAN [ In reply to ]
> To access some WLAN I have to login on a webpage with certain
> credentials. Until I do that all communication is blocked so e-mail or
> messaging clients can't connect.
>
> Is there a simple way to send such login request from command line /
> script? It would be ideal if such script was invoked automatically just
> after connection to this network.

I put a crude script in /etc/network/if-up.d for this purpose. I apologize for the mangling Modest is likely to do to the script below, but I hope it helps you begin work on a script suitable to your own needs.

#!/bin/sh
#
# Automatically log into mySSID

set -e

if [ "$IFACE" = lo ]; then
exit 0
fi

if [ "$MODE" != start ]; then
exit 0
fi

if [ "$ICD_CONNECTION_TYPE" != WLAN_INFRA ]; then
exit 0
fi

key="/system/osso/connectivity/IAP/$ICD_CONNECTION_ID/name"
name=$(/usr/bin/gconftool -g "$key")

if [ "$name" != mySSID ]; then
exit 0
fi

wget --no-check-certificate --quiet -O - \
--post-data="reqForm=perfigo_login.jsp&uri=&cm=&userip=`ifconfig \
| grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | \
awk '{ print $1}'`&session=&pm=&index=0&pageid=-1&compact=false&registerGuest=NO&userNameLabel=mySSID%20ID&passwordLabel=Password&guestUserNameLabel=guest&guestPasswordLabel=guest&username=user&password=pass&provider=mySSID" \
https://wireless-cas.mydomain.com/auth/perfigo_cm_validate.jsp

exit 0

_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users
Re: Automatic website logging to WLAN [ In reply to ]
2011/1/13 Jakub G <jakubg@post.pl>:
>
> To access some WLAN I have to login on a webpage with certain credentials.
> Until I do that all communication is blocked so e-mail or messaging clients
> can't connect.
>
> Is there a simple way to send such login request from command line / script?
> It would be ideal if such script was invoked automatically just after
> connection to this network.

Fredrik Wendt's Wifi Assistant may be exactly what you want:

http://wiki.maemo.org/WifiAssistant
http://talk.maemo.org/showthread.php?t=59574
http://maemo.org/packages/view/wifi-assistant/

Available in Extras.

Cheers,

Andrew

--
Andrew Flegg -- mailto:andrew@bleb.org  |  http://www.bleb.org/
Maemo Community Council member
_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users