Skip to content

Instantly share code, notes, and snippets.

@CreateRemoteThread
Created August 7, 2017 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CreateRemoteThread/248c18ee8de98bea039bcb0b5255a9c7 to your computer and use it in GitHub Desktop.
Save CreateRemoteThread/248c18ee8de98bea039bcb0b5255a9c7 to your computer and use it in GitHub Desktop.
#!/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