Skip to content

Instantly share code, notes, and snippets.

@7h3rAm
Created August 27, 2015 05:19
Show Gist options
  • Save 7h3rAm/fc12dca1b5492b171cc3 to your computer and use it in GitHub Desktop.
Save 7h3rAm/fc12dca1b5492b171cc3 to your computer and use it in GitHub Desktop.
#!/usr//bin/env python
import sys
if len(sys.argv) != 3:
print "USAGE: %s <KFFSE_XHKYOKXOHOFEDM^E_Y> <0x2a>" % (sys.argv[0])
sys.exit(1)
flag = sys.argv[1]
key = int(sys.argv[2], 16)
decoded = []
for c in flag:
decoded.append(chr(ord(c) ^ key))
decoded = "".join(decoded)
print "%s ^ 0x%x => %s" % (flag, key, decoded)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment