Promiscuous ports under Linux
Marko Rauhamaa
marko at pacujo.net
Thu May 4 01:42:01 EDT 2017
Peter Pearson <pkpearson at nowhere.invalid>:
> Cobbling together a minimalist ethernet-sniffing program, I was hoping
> to use this simple mechanism for setting the socket to "promiscuous
> mode" (to see all traffic going past, instead of just traffic
> addressed to my machine):
>
> s.ioctl(socket.SIO_RCVALL, socket.RCVALL_ON)
>
> Unfortunately, it seems that that mechanism is available under Windows
> but not under Linux.
Can't remember having done that for years, if ever. However, one place
to give you pointers is running:
strace tcpdump
as root. It reveals all the system calls involved.
Marko
More information about the Python-list
mailing list