Every dog has a blog!
[ start | index | login or register ]
start > 2009-12-21 > 1

WiFi-/WLAN-Authentication at T-Mobile Hotspots (ICE Train)

Created by derjohn. Last edited by derjohn, 3 years and 156 days ago. Viewed 1,147 times. #2
[diff] [history] [edit] [rdf]
labels
attachments

WiFi-/WLAN-Authentication at T-Mobile Hotspots (ICE Train)

At the moment I take the ICE train of Deutsche Bahn twice a week. The particular train does offer Internet-Connection in cooperation with T-Mobile. The authentication is done via a captive portal and one needs a T-Mobile Hotspot Account, which is part of many Deutsche Telekom and T-Mobile products. The usability of the captive portal sucks a little, as the browser does not save your credentials. So I captured the https-communication via Firefox liveheaders extension, extracted what's needed for authentication and wrote a little bash script to simplify the logon :-) It's free, public domain, so use it if you like. Keep in mind that the script does accept the terms of use (AGB) automatically!

Simply start it like this:

shell$ wlan-auth.sh yourlogin yourpass
If you use wicd as WiFi-Manager, you can also make the script run automatically if wicd connects to the T-Mobile_ICE Hotspot :)

And here is the wlan-auth.sh script:

#!/bin/sh HSUSER=$1 HSPASS=$2

echo "You accepted the terms of use (AGB)!";

if [ -e /tmp/tmobilehotspot-cookie ]; then rm /tmp/tmobilehotspot-cookie; fi

curl -c /tmp/tmobilehotspot-cookie \\ -F username=${HSUSER} \\ -F password=${HSPASS} \\ -F strAGB=AGB \\ -F strHinweis=Zahlungsbedingungen \\ -F x=48 \\ -F y=3 \\ >>https://hotspot.t-mobile.net/wlan/index.do

while ( true ); do curl -b /tmp/tmobilehotspot-cookie >>https://hotspot.t-mobile.net/wlan/index.do > /dev/null sleep 300 done

Please login to blog.derjohn.de.

< May 2013 >
SunMonTueWedThuFriSat
1234
567891011
12131415161718
19202122232425
262728293031


Logged in Users: (1)
… and 2 Guests.

Blogrolling:
>>Blog des Wahnsinns
>>Daniel Holbach's Blog
>>Matt Cutt's blog
>>Randgruppentourismus

XHTML 1.0 validated
CSS validated
RSS 2.0 validated
RSS Feed

Hinweise zur Formatierung
snipsnap-help.

Powered by
SnipSnap 1.0b1-snipit

Ads will be placed here!

dem john sein blog | Impressum: Andreas John, Frankfurter Str. 98a, 63067 Offenbach, E-Mail: himself@derjohn.de