Ryan air flight route map without silverlight

Update (Nov 2014):
The new version on their website doesn’t require silverlight anymore. I’ll not update the map again and probably turn it down completely at some point.

Ryainair Flightmap JS-Version ScreenshotI’m not sure why they made this stupid mistake of providing their map data in silverlight only. However, here is a javascript-only version of the ryan air flight map data based on Google maps, which I made quickly and will hopefully benefit others as well.

Onlinetickets der Deutschen Bahn (Teil 2)

Ein paar Formatänderungen und viele neue Samples. Was hat sich seit dem letzten Mal getan?

  • EC/Kreditkartennummern werden nun auch im Ticket mit *** maskiert (seit 02/2012). Ausnahme: Personalausweisnummern, die ja u.a. das Geburtsdatum enthält.
    Witziges Detail: Die EC-Kartennummer wird auf 2 Stellen am Ende maskiert: ******78, aber im 0080ID-Block stehen weiterhin die letzten 4 Ziffern im Klartext.
  • Seit 04/2012 gibt es ein zusätzliches Feld mit maschinenlesbarer Trennung aus Vorname und Name.
  • Einige (sehr wenige) Tickets haben einen 0080VU Block mit 39-40 Byte Binärdaten und bisher weiß anscheinend noch keiner was so drin ist.

Spielen mit den Tickets macht jetzt mehr Spaß, denn zxing kann nun Aztek-Barcodes in den meisten Fällen decodieren, folglich gibt’s das kurze Script parsepdfs.sh, das aus einem Verzeichnis voller Onlineticket-PDFs lauter Dateien mit den Binärinhalten der Barcodes erstellen kann, die sich dann mit onlineticket.py ansehen lassen.
Außerdem habe ich das Programm ein wenig überarbeitet, sodass es nun deutlich robuster ist.

Aus den öffentlich zugänglichen Onlinetickets habe ich dann mal die Seriennummern extrahiert und gegen die Zeitachse aufgetragen.
Jetzt wissen wir also wieviel Onlinetickets die Bahn so verkauft. In 2010 hat der Zähler 100 Millionen erreicht und wurden dann wohl zurückgesetzt (roter Graph), wär das nicht passiert wäre der blaue Graph bei rausgekommen.

Announcing Osmatravel

Illustration of a map created using osmatravel

Update: This project is obsolete now. Use the {{mapframe}} with PoiMap2 in Wikivoyage instead.

Quite frequently I refer to WikitravelWikivoyage for information on places which are not covered by my guidebook, but a key-element that is pretty much always missing is: maps. Of course there is OpenStreetMap, but when I see a listing in a Wikitravel article, I also want to know where it is.
So someone else came up with a great idea, based on two facts:

  1. The listings in Wikitravel articles are mostly in a xml-format, i.e. machine-readable.
  2. Most names of these objects are also found as entries in OSM data.

Thus, he created a set of scripts and magic that is able to semiautomatically generate a map to a wikitravel article and put all the listings there, so that these can be easily located. The project is based on osmarender for rendering of raw osm-data into an image, thus the name osmatravel. Unfortunately there are some issues and the project did not receive any attention since 2009 making it practically unusable.

Illustration of a map created using osmatravelHowever, I invested some time, did a fork (github:osmatravel) and a lot of changes and adjustments, allowing anyone to create cool maps again (instructions).

See also:

What’s next?
During my time working on the project I discovered some limitations. The main one is that osmarender just uses xslt and maps don’t look as nice as mapnik ones. However, mapnik requires a database to work, which is a drawback concerning easy setup and usability.
Another main problem is data quality since some articles don’t use the xml-listings yet or the names don’t quite match the OSM ones, thus before being able to actually produce maps, cleanup needs to be done.
I imaging though that the ideas could be used to implement a webservice that automatically generates the svg-files for articles. This would make it much easier for people to actually make use of this project.

Dropbox Bytecode Decryption Tool

Dropbox is actually just a python application, so it is shipping the bytecode of its modules which one could theoretically use in other applications. Also building a more lightweight dropbox-client, that does not come with its own interpreter, might be a goal. Apparently though, dropbox does not want this and makes it slightly harder to get to the bytecode.
So here is a project I’ve been working on quite some time ago, which converts the encrypted python modules of dropbox to real python-2.5 modules usable in a normal interpreter. This works just fine, but as I don’t have the time to pursue this any further I’ll just provide the results (or the source) and hope that others use this as a base to continue.

The encryption scheme is actually quite simple. It uses the TEA cipher along with an RNG seeded by some values in the code object of each python module. They adjusted the interpreter accordingly so that it a) decrypts the modules and b) prevents access to the decrypted code-objects. This would have been the straightforward path just letting dropbox decrypt everything and dump the modules using the builtin marshaller.
Another trick used is the manual scrambling of the opcodes. Unfortunately this could only be fixed semiautomatically thus their monoalphabetic substitution cipher proved quite effective in terms of winning some time.

You’ll find the source at github/dropboxdec

Grab and unpack the prerequisites::

wget -nv https://github.com/rumpeltux/dropboxdec/tarball/master -O - | tar xzv
wget -nv http://dl-web.dropbox.com/u/17/dropbox-lnx.x86-1.1.45.tar.gz -O - | tar xzv
# use dropbox-lnx.x86_64-1.1.45.tar.gz if you're running a 64bit os
cd .dropbox-dist; unzip library.zip; chmod a+rw -R .; cd ..

Run the decryption tool::

python dropboxdec*/dec.py .dropbox-dist

From here
The decrypted modules are python-2.5 bytecode, thus will only work in a 2.5 bytecode interpreter. There are some decompilers for other python-versions which will need some adjustments to be able to decompile the code, if anyone wants to dive deeper into the protocol.
The decryption also only works for the 1.1.45 version of dropbox. In the 1.2 branch the simple RNG was exchanged to the Mersenne Twister, so the decryption program would need to be adjusted accordingly.

If you do anything cool with it, I’d very much appreciate if you’d drop me a line and let me know 🙂 Other than that, have fun hacking!

Protein Design

Protein Design Cycle
In my efforts towards world domination, I discovered that the key technology to master is biology. In a recent seminar I had to dive quite deep into protein design trying to figure how it works and what the fundamental concepts of this bioinformatic technique are.

So here are:

which I hope provide some insight into this fantastic technique and its promises.

The slides were actually done in html5 using html5slides, but the project does not yet use all the power html5 has to offer, so the slides remain pretty basic and a lot of layout overhead was needed.