Skip to content

Instantly share code, notes, and snippets.

View ngg's full-sized avatar

Gergely Nagy ngg

  • 13:44 (UTC +02:00)
View GitHub Profile
@ngg
ngg / solve.py
Created October 19, 2019 17:05
Very Simple Haskell (HITCON CTF 2019) writeup by NGG from !SpamAndHex
#!/usr/bin/env python2
"""
As I'm not confident enough in my own Haskell comprehension skills, I started with reimplementing the whole thing in Python,
checking each function if it does the same thing.
At the end it seemed like it does the following:
- There is some padding of the flag based on its length (which we know, so it will be irrelevant)
- The flag is treated as a bit string
- Each bit position has a value assigned to it based on primes