import socket import binascii import struct def opcodify(hexstr): return struct.pack('