python-golf

Created 08 Jun 2024

Terminal Challenge

A writeup for the hangman challenge on my homepage. As far as I know it's a completely original challenge; if anything I'm proud of the implementation and how real the terminal feels. The core idea came from talking with a friend about writing a python file that sanitizes to a fixed string, reminiscent of quines.

Hint 1

Hint 2

Hint 3

Solution

FAQs

How did you get Python to run in the browser???
I talked to my comp-sci teacher who helps run this educational tool - and he told me about how they use Pyodide and a web worker. So I implemented that.
This is all client-side, so shouldn't I be able to cheese the flag by just looking in F12?

Indeed there used to be a cheese solution by just going into F12 and realising that init.py contained the flag (thanks @xp3dx) - but I moved it >:)

I have no idea if the flag is still accessible like this because I don't know enough about Next.js, but I will tell you that in my Next.js app it's in components/challenge.js - feel free to try and hunt for it in whatever obsfucated garbage Next.js gives you...

The source code for this project can be found here. You can contact me (the author) via my homepage.