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

Scapy commands

Scapy provides us with many commands to investigate a network. We can use scapy in two ways: interactively within a terminal window or programmatically from a Python script by importing it as a library.

These are the commands that may be useful to show in detail the operation of scapy:

  • ls(): Displays all the protocols supported by scapy
  • lsc(): Displays the list of commands and functions supported by scapy
  • conf: Displays all configuration options
  • help(): Displays help on a specific command, for example, help(sniff)
  • show(): Displays the details of a specific packet, for example, Newpacket.show()

Scapy supports about 300 network protocols. We can have an idea with the ls() command:

scapy>ls()

The screenshot shows an execution ...

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