Scapy is a powerful interactive packet manipulation tool, packet generator, network scanner, network discovery tool, and packet sniffer. It is written in the Python, and is installed by default on Backtrack 4+. On Ubuntu it can be installed using this command:
sudo apt-get install scapy
scapy at the command-line to run the Python interpreter with the scapy libraries loaded.
Start up scapy and run the
ls() command. This will list all supported packet types.
$ scapy Welcome to Scapy (22.214.171.124 beta) >>> ls() ARP : ARP ASN1_Packet : None BOOTP : BOOTP CookedLinux : cooked linux DHCP : DHCP options ...more
List all available functions using
>>> lsc() sr : Send and receive packets at layer 3 sr1 : Send packets at layer 3 and return only the first answer srp : Send and receive packets at layer 2 srp1 : Send and receive packets at layer 2 and return only the first answer srloop : Send a packet at layer 3 in loop and print the answer each time
ls() command can do much more. Show the contents of the IP structure with