Skip to content

Instantly share code, notes, and snippets.

@Jack2
Created November 7, 2015 02:38
Show Gist options
  • Save Jack2/1117fc572ca8f3614b65 to your computer and use it in GitHub Desktop.
Save Jack2/1117fc572ca8f3614b65 to your computer and use it in GitHub Desktop.
from socket import *
s = socket(AF_INET, SOCK_STREAM)
s.connect(('192.168.0.8',4223))
data = "01"+hex(50-6+len(pdu)/2)[2:]+"000005010008002000"+hex(38-6+len(pdu)/2)[2:]+"0001"+hex(0x1d-6+len(pdu)/2)[2:]+"0006"+hex(0x1a-6+len(pdu)/2)[2:]+"00079128019291900001000b811070820289f90000"+"1149B7BA3CA6A7DF6ED0B43E1E97E773"+"200300010101"
s.send(data.decode('hex'))
s.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment