Created
November 25, 2016 08:13
-
-
Save seshagiriprabhu/1d4dca155878c3c868658e972a39a2f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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