O'Reilly logo

Mastering Python for Networking and Security by Jose Manuel Ortega

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Packet-sniffing with scapy

Most networks use broadcasting technology (view info), which means that each packet that a device transmits over the network can be read by any other device connected to the network.

WiFi networks and networks with a HUB device use this approach, however smarted devices such as routers and switches will only route and pass packets to the machines available in their route table. More information about broadcast networks can be found at https://en.wikipedia.org/wiki/Broadcasting_(networking).

In practice, all computers except the recipient of the message will realize that the message is not intended for them and ignore it. However, many computers can be programmed to see each message that crosses the network.

One ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required