Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#!/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