All pastes #708469 Raw Edit

Miscellany

public text v1 · immutable
#708469 ·published 2007-09-23 21:19 UTC
rendered paste body
#!/usr/bin/env python

import sys
from struct import *
from socket import *

s = socket(AF_INET, SOCK_STREAM)
s.connect(("vortex.labs.pulltheplug.org", 5842))
buf = ""
while len(buf) < 16:
        buf = buf + s.recv(4)

print len(buf)
ints = unpack("IIII", buf)

result = ints[0] + ints[1] + ints[2] + ints[3]
print result

s.send(pack("Q", result))
print s.recv(1000)