Skip to content

Instantly share code, notes, and snippets.

@seshagiriprabhu
Created November 25, 2016 08:13
Show Gist options
  • Save seshagiriprabhu/1d4dca155878c3c868658e972a39a2f5 to your computer and use it in GitHub Desktop.
Save seshagiriprabhu/1d4dca155878c3c868658e972a39a2f5 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python2
import binascii
import base64
flag=""
for i in range(0, 20):
f = open('Chapter' + str(i) + '.zip', 'r')
content = f.read()
hex_text = binascii.hexlify(content)
if int(hex_text[-2:], 16) != 0:
flag_hex = (hex_text[-16:].rstrip('=')).decode('hex')
flag += base64.b64decode(flag_hex + '=' * (-len(flag_hex) % 4)).strip('\n')
f.close()
print flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment