Skip to content

Instantly share code, notes, and snippets.

@sk0x1234
Created May 23, 2020 16:28
Show Gist options
  • Save sk0x1234/278e0275cdbafe6cc249f6d78e83daff to your computer and use it in GitHub Desktop.
Save sk0x1234/278e0275cdbafe6cc249f6d78e83daff to your computer and use it in GitHub Desktop.
247CTF unknown service 1.0
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