Skip to content

Instantly share code, notes, and snippets.

@volpino
Created April 20, 2015 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save volpino/df5c0a95dab710d064e5 to your computer and use it in GitHub Desktop.
Save volpino/df5c0a95dab710d064e5 to your computer and use it in GitHub Desktop.
pctf cryptoserv client
from socket import socket
import struct
def q(word):
return struct.pack("<I", word)
message = "\x00\x00\x06\x00AAAA"
message += "\x00\x01\x07\x00AAAA"
message += "\x0c\x00\x00\x00AAAA"
plain = "AAAAAAAA"
s = socket()
#s.connect(('127.0.0.1', 4141))
s.connect(('52.4.141.125', 4141))
s.send(q(len(bytecode) / 8))
s.send(q(len(plain)))
s.send("\x00" * 8)
s.send(bytecode)
s.send(plain)
print repr(s.recv(1024))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment