Skip to content
Advertisement

Python Socket – Sniffer does not intercept all packets

My sniffer is running on linux via virtualbox. A network bridge with promiscuous mode between linux and windows. I want to intercept windows packets while on linux. But my program does not intercept these packets. However, it can do this if I run tcpdump and the program itself at the same time.

I created the socket as follows:

JavaScript

Advertisement

Answer

Add these lines to the code:

JavaScript

It is necessary to enable promisc mode for the network interface.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement