Skip to content

Instantly share code, notes, and snippets.

@quandqn

quandqn/hack.py Secret

Last active July 13, 2017 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quandqn/687f28c123f9a1594db254f7891fd774 to your computer and use it in GitHub Desktop.
Save quandqn/687f28c123f9a1594db254f7891fd774 to your computer and use it in GitHub Desktop.
from Crypto.Util.number import *
from hashlib import md5
flag = "XXX"
assert len(flag) == 14
pad = bytes_to_long(md5(flag).digest())
hack = 0
for char in flag:
hack+= pad
hack*= ord(char)
print hack
#hack = 64364485357060434848865708402537097493512746702748009007197338675
#flag_to_submit = "MeePwnCTF{" + flag + "}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment