Created
August 7, 2017 04:00
-
-
Save CreateRemoteThread/248c18ee8de98bea039bcb0b5255a9c7 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/python | |
import os | |
import pwn | |
import string | |
import sys | |
pwn.context.log_level = 'error' | |
existingflag = "flag{" | |
c = 0 | |
tries = 0 | |
while c < len(string.printable): | |
p = pwn.process(["wine","asby.exe"]) | |
d = p.readuntil("?") | |
flag = existingflag + string.printable[c] | |
p.sendline(flag + ">") | |
data = p.readuntil("WRONG",timeout=1.0) | |
dx = "%d:CORRECT" % (len(existingflag) + 1) | |
print flag | |
if dx in data: | |
existingflag += string.printable[c] | |
c = 0 | |
print data | |
continue | |
c += 1 | |
tries += 1 | |
p.kill() | |
print tries |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment