Lukas Klein

Python and Django developer. Docker enthusiast. This is my blog.

Building a realtime audio transcoder with Docker, FFmpeg and Flask

Recently I was faced with the issue of having a device capable of playing MP3s from the network, but I only had MP4s available. Since the source files were too many and changing daily, transcoding them in advance and effectively mirroring them was not an option. The only solution would be to do it on demand. A great opportunity to get fancy with Docker.

Read More

Homeautomation with MAX! heating system

I recently bought the Max! Cube LAN Gateway and a thermostat from Amazon to extend my home automation efforts.

Read More CTF 2013: Challenge 4 "Pay TV" (web)

Who doesn’t want to hack Pay TV? :) So do I. The challenge was a nice website with a tv on it that showed static and a form that requested a password. A quick analysis of the JS revealed the following interesting line:

Read More CTF 2013: Challenge 7 "Robots Exclusion Committee" (web)

The challenge was to find the first secret from a given webpage. The problem was that there was only a form that didn’t really work (it was meant to send you an email with login credentials).

Read More

Check if IP is in CIDR subnet

Sometimes, you need to check if an IP address is in a specific subnet. E.g., when writing a GitHub webhook endpoint, you want to check that the originating IP is one of GitHub’s. There’s an API call you can make to get the list of subnets hook calls can originate from:

Read More

Changing request.POST values in Django

When you try to change request.POST in a Django view it will raise a QueryDict instance is immutable exception. In order to change/add values you have to create a shallow copy instead of a binding.

Read More

Setting a custom iOS WhatsApp password

I’m currently developing on the WhatsAPI, but there’s one problem when you’re using an iPhone: no one has figured out yet how your password is being generated. On Android devices it’s just the md5 hash of the reverse of the IMEI number of your phone, but neither this nor all possible hash-combinations of the iPhone’s UDID did word. So I did some network sniffing and figured out how a device is being registered and how you can use this to manually reset your WhatsApp password.

Read More

Checking if an email address exists

Today I was faced with an interesting question: How can you tell if an email-address exists? Yep, not if it’s valid (that’s easy with some regexp-magic), but if it actually exists. I came up with a simple Python-solution.

Read More

Mc Donalds WiFi, surrender!

Ever since I’m here in New Zealand I’ve been using the free WiFi at every Mc Donalds. Great! Free WiFi! =)

Read More

Check whether your iDevice has a camera built in in Phonegap

Earlier this week I discovered Phonegap when I got a beta-invite to their new build-service. To those who never heard of Phonegap before, it is:

Read More