On Dec 19, 5:50 pm, Dirk Loss <[EMAIL PROTECTED]> wrote: > scripteaze wrote: > > >>> I need to be able to send a rip1 request to my rip1 enabled device., ok i got everthing setup and its sending the packets, do i have to create a socket server or cant i simply setup a buf = 1024 and recieve the replies and display them, i dont need to interact, just view the returned data if any, thanks
> > Well, i use scapy quite often, however, this needs to be very portable > > import socket > rip_request = '\x01\x01\x00\x00\x00\x02' + '\x00' * 17 + '\x10' > s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) > s.sendto(rip_request, ("servername", 520)) > s.close() > > If you also want to handle the replies, you might want to have a look at > the SocketServer module: > > http://docs.python.org/lib/module-SocketServer.html > > Regards > Dirk -- http://mail.python.org/mailman/listinfo/python-list