Send packet python -


how in python? this.

packetbuffer[0] := $00; packetbuffer[1] := $12; packetbuffer[2] := $12; 'sendpacket(processid, @packetbuffer, true, false);' 

use socket module:

import socket s = socket.socket(socket.af_inet, socket.sock_stream) s.connect((your_host, your_port)) msg_to_send = 'whatever' num_sent = 0 while num_sent < len(msg_to_send):     sent = s.send(msg_to_send[num_sent:])     if sent == 0:         raise runtimeerror("socket connection broken")     num_sent += sent 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -