These files are web applications that generate PNGs on request containing a friendly greeting with the IP address of the requester.
The PHP was originally written by Andrew Kvalheim
probably around 2010. Its filename at that time was avatar.png
, so as to
give the illusion that it was a static file.
I wrote the Python many years later in an attempt to understand what Andrew had written. When I first read that code it was black magic to me. Happening by it again after such a long time, it seemed the most appropriate thing to do was to port the PHP to a language I'm very familiar with. The result is a small Flask app that reproduces the original output in a more Pythonic fashion.
I've added some extra comments should anyone else seek to understand what my version is doing.