MeePwn CTF 2017: |\/|/-\T|-| (100)
Tue 18 July 2017 ·
2 min read
We are given a file, hack.py
, which looks as follows.
from Crypto.Util.number import *
from hashlib import md5
flag = "XXX"
assert len(flag) == 4
pad = bytes_to_long(md5(flag).digest())
hack = 0
for char in flag:
hack+= pad
hack*= ord(char)
print hack
print pad
print hack % pad
#hack …