Sniffer with RAW SOCKETS

2005-09-07 Thread billiejoex
Hi all. I'm trying to make a simple icmp sniffer by using SOCK_RAW. The code below works but ONLY if I first use the sendto() function. Does anybody knows why? Regards from socket import * import select def recv(): while 1: if s in select.select([s],[],[],99)[0]: reply =

Re: Sniffer with RAW SOCKETS

2005-09-07 Thread Grant Edwards
On 2005-09-07, billiejoex [EMAIL PROTECTED] wrote: Hi all. I'm trying to make a simple icmp sniffer by using SOCK_RAW. Just a suggestion: you'd probably be better off using the PCAP library. The code below works but ONLY if I first use the sendto() function. Does anybody knows why? 'Fraid