Scapy is a flexible packet generation and sniffer program written in Python. Using Scapy, you can create arbitrary packets, send them to the wire, reading packets from the wire or a dump file, transform packets, etc. Using Scapy's generic packet manipulation capabilities, you can easily do things like SYN scan, TCP traceroute, and OS fingerprinting. You can also integrate Scapy into another tool by importing it.
The import error indicates that you do not have Scapy installed on your Linux system. Here is how to install Scapy on Linux.
Install Scapy on Debian, Ubuntu or Linux Mint
Install Scapy on Fedora or CentOS/RHEL
On CentOS/RHEL, you need to enable EPEL repository first.
Install Scapy from the Source
If your Linux distribution does not offer Scapy package or you want to try the latest Scapy, you can install Scapy manually from the source.
Download the latest version of Scapy, and install it as follows.
$ cd scapy-2.*
$ sudo python setup.py install
Subscribe to Ask Xmodulo
Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!