I';我已在Smartsniff中捕获了一个数据包,并希望在Python中重新发送它

I';我已在Smartsniff中捕获了一个数据包,并希望在Python中重新发送它,python,packet-capture,packet-sniffers,packets,Python,Packet Capture,Packet Sniffers,Packets,在localhost:23150和localhost:6010之间捕获的数据包 ================================================== Index : 5 Protocol : TCP Local Address : 127.0.0.1 Remote Address : 127.0.0.1 Local Port : 23150 Remote Port : 6010 Lo

在localhost:23150和localhost:6010之间捕获的数据包

==================================================
Index             : 5
Protocol          : TCP
Local Address     : 127.0.0.1
Remote Address    : 127.0.0.1
Local Port        : 23150
Remote Port       : 6010
Local Host        : 
Remote Host       : 
Service Name      : 
Packets           : 4
Data Size         : 2,048 Bytes
Total Size        : 3,708 Bytes
Data Speed        : 
Capture Time      : 4/1/2016 11:37:32 AM:483
Last Packet Time  : 4/1/2016 11:37:32 AM:484
Duration          : 00:00:00.001
Local MAC Address : 
Remote MAC Address: 
Local IP Country  : 
Remote IP Country : 
==================================================

00000000  63 6C 74 00 04 00 0E 00  01 00 00 00               clt..... ....
可能吗?如果是,怎么做?我创建了一个通过套接字发送的函数:

def send_cmd(port, message):
    TCP_IP = '127.0.0.1'
    TCP_PORT = port
    BUFFER_SIZE = 1024
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((TCP_IP, TCP_PORT))
    print "connected"
    s.send(message)
    data = s.recv(BUFFER_SIZE)
    print "received data:", data
    s.close()
谢谢你抽出时间