-
-
Save 193s/68b0cd8708c70c6c8b7d 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 python | |
comments = open('./comments').read() | |
f = open('./path').read().splitlines() | |
from zipfile import ZipFile | |
z = ZipFile(open('./gomi/pwd.zip')) | |
names = z.namelist() | |
flag = '' | |
for line in f: | |
flag += comments[names.index(line + '.txt')] | |
print repr(flag) | |
open('white', 'w').write(flag) | |
open('w2', 'w').write(flag.replace('\n', '').replace(' ', '0').replace('\t', '1')) | |
b = open('./w2').read() | |
t = '' | |
for i in xrange(0, len(b), 8): | |
t += chr(int(b[i:i+8], 2)) | |
print t | |
#print flag |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment