Created
May 23, 2020 16:28
-
-
Save sk0x1234/278e0275cdbafe6cc249f6d78e83daff to your computer and use it in GitHub Desktop.
247CTF unknown service 1.0
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
import socket,re | |
with socket.socket(socket.AF_INET,socket.SOCK_STREAM) as s: | |
s.connect((host,dport)) | |
while( i < 500): | |
res = str(s.recv(1024).decode()) | |
print(res) | |
try: | |
item = re.findall('\d+ \+ \d+',res)[0] | |
buf = str(eval(item))+ '\r\n' | |
s.sendall(bytes(buf.encode())) | |
else: | |
printf(error!!) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment