Last active
October 15, 2016 17:50
-
-
Save sgviking/27e9d6e915bff50541322351c3f1f599 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 | |
# 0B E5 | |
# 4D E2 | |
quack = b"" | |
with open('newflag', 'rb') as f: | |
while True: | |
oldpos = f.tell() | |
byte = f.read(1) | |
newpos = f.tell() | |
if oldpos == newpos: | |
break | |
if byte == b'\x0B' or byte == b'\x4D': | |
byte = f.read(1) | |
if byte == b'\xE5' or byte == b'\xE2': | |
byte = f.read(1) | |
quack += byte | |
with open('quack.bin', 'wb') as f: | |
f.write(quack) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment