Tag Archives: mobile

Login to Telekom Hotspot on Linux command line

So, my old laptop has been reactivated to a 16.04 LTS ubuntu release. When traveling, I frequently do use the Telekom Hotspot services, and given how I like using the Tor Browser (with some additional plugins just because I’m fed up with all the tracking) there’s a litle issue: I need to log in to a web page to start using the hotspots, but I cannot start browsing with the Tor browser before I have a network connection.

No big deal on a Mac with the wispr stuff to automatically fill out the captive portal pages for you, or at least automatically pop them up in a window separate from your browser. So, what are the options on Linux?

  1. Start firefox, first, log in to the hotspot, shut down firefox again to then start the Tor browser.
  2. Somehow work in a “-new-instance” argument into starting Tor Browser so you can actually do #1 but leave firefox open (which helps with stuff like posting on wordpress.)
  3. Use some entirely other browser unrelated to firefox as your second/first browser to log in to the hotspot
  4. Use a WISPR client like this one (though the page has issues as of writing this), but the whole approach seems like a security issue.
  5. log in to the hotspot on the command line

So, yes … Linux geeks chose option #5:


use strict;
use Term::ReadKey;

my $username;
my $password;

print "username: ";
$username = <>;
chomp $username;

ReadMode ('noecho');
print "password: ";
$password = <>;
chomp $password;
ReadMode ('restore');

print "\n";

system ( "curl 'https://hotspot.t-mobile.net/wlan/rest/login' -H 'Host: hotspot.t-mobile.net' -H 'User-Agent: Mozilla/5.0 (X1
1; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Lang
uage: en-US,en;q=0.5' --compressed -H 'Content-Type: application/json;charset=utf-8' -H 'X-Hash: AjbCkwnbQWKb+eKqFSelsyugcyVt
XiU1ZkUjnqDYhsA=' -H 'Referer: https://hotspot.t-mobile.net/TD/hotspot/Tank_Rast_Petro/en_GB/index.html' -H 'Content-Length: 
57' -H 'Cookie: JSESSIONID=1111D92CBA6C27FE69D13F04F5CD4497.P3; POPUPCHECK=1496237026311; DT_H=NzY5OTk0MTgy' -H 'Connection: 
keep-alive' -d '{\"username\":\"$username\",\"password\":\"$password\"}' ");

Make sure you have the Term::ReadKey module installed. On Xenial you do:

apt install libterm-readkey-perl

Tagged , , ,

New Software: dofCalc, the mobile, cross-platfrom Depth-of-Field Calculator

It’s been a while since I announced (along the way) that I was going to get a DSLR camera in this post. Well, I have got it by now. It’s an Olympus E-520 I bought with the two kit lenses. With a few initial hurdles cleared, I’m quite happy with it. Obviously, as soon as you start to extend your own limits, you painfully recognize where the new ones are. So it is when after buying an entry class DSLR with a pair of pretty decent kit lenses you start to take different kinds of pictures and more consciously, you start to find yourself in situations where you don’t even press the release because without trying you know there’s no way your equipment is going to get the picture at the right exposure, sharp, with sufficient depth-of-field. As always, it is the last few percent of excellence that take the greatest energy to achieve. It is not just energy, though. There is a considerable amount of money involved in wanting this lens, that body, this tripod, or that flash.

Now, as a hobbyist, there are limits to the amount of money I’m willing to spend per year. But there are other ways of putting energy to a good use. One thing that has been nagging me, was that I had all those depth-of-field calculators online, but none which I could carry around. Yes, there are cardboard dials you can carry around, but that’s one more (rather frail) thing to carry around in the already limited space of my camera bag. Yes, there is depth-of-field calculator software for the iPhone and one for PalmOS, but I have no such device. I do, however, own a Java-enabled mobile phone which I carry around most of the time, anyway. And as a big fan of the “write-once-run-anywhere” idea, I was mildly annoyed that nobody had implemented such a piece of software in a cross-platform way. Then I did it, myself.

So, this then is dofCalc, the portable depth-of-field calculator that requires no more than a Java-enabled mobile device that supports MIDP 2 and CLDC 1.1. It not only allows you to calculate the depth-of-field from the other related values, but also to calculate any of the other parameters, like aperture from a desired depth-of-field, focal length, and subject distance. Along the way, it can calculate the hyperfocal distance and has a configurable circle of confusion to be usable with virtually any camera. If you think this could be useful, visit the sourceforge site and download it for free. I’ll be looking forward to your feedback.

Tagged , , , , , , , , , ,