2

Packet captured between localhost:23150 and 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..... ....

Is that possible? And if so, how? I've created a function to send over socket:

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()

Thanks for your time.

0 Answers0