I’m a command line freak and thus I want to read the call logs from my newly converted Freakz^wFritz!Box from the command line.
First I tried to mess with the telnetd on the box but I didn’t find the logs and as it is possible to fetch a csv-file containing the call-log via the web-interface I turned my attention to that.
In the olden times it was apparently possible to just log into the boxes webinterface by POSTing the password, save the cookie and request stuff.
Nowadays AVM has implemented a challenge-response protocol using javascript. If you can answer a challenge with the correct md5 hash you get a session id to use the web=interface.
This might be a nice thing from a security perspective but it sucks a little for scripting. Meh.
But a little python magic solves the problem.
So here you go: fritzlog.py
Usage: python fritzlog.py <password>
You can also edit the script and make your password the default.
Du meinst natürlich :
from hashlib import md5
Hmm, nope… from md5, hashlib tuts aber auch
hashlib has been depracated in 2.6. I did some general cleanup, the script can be found at http://gist.github.com/307170
Thanks!
I just saw that it seems to be possible to initiate calls with that script. Doublenice!