Created
October 26, 2014 11:50
-
-
Save yohanes/d756d49397583a3043cd to your computer and use it in GitHub Desktop.
Daemon 4 .so HITB2014
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
import socket | |
import sys | |
import time | |
def recv_until(st): | |
ret = "" | |
while st not in ret: | |
ret += s.recv(8192) | |
return ret | |
s = socket.create_connection(("localhost", 56789)) | |
print recv_until("access:") | |
s.send("12345678901") | |
print "recv" | |
time.sleep(0.1) | |
f = s.recv(8192) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment