Hidden 03 solved
This commit is contained in:
parent
97efd59a23
commit
a57a57ad41
24
Hidden 03/decode.py
Normal file
24
Hidden 03/decode.py
Normal file
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import sys
|
||||
import socket
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print("Invalid usage: %s <outfile>" % sys.argv[0])
|
||||
exit(1)
|
||||
|
||||
OUTFILE = sys.argv[1]
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.connect(('whale.hacking-lab.com', 17))
|
||||
|
||||
data = ""
|
||||
|
||||
while True:
|
||||
buf = sock.recv(16)
|
||||
if buf:
|
||||
data += buf.decode("UTF-8")
|
||||
else:
|
||||
break
|
||||
|
||||
with open(OUTFILE, "a") as f:
|
||||
f.write(data.strip())
|
Loading…
Reference in New Issue
Block a user