Last updated on July 10, 2020 by Dan Nanni
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.
$ sudo apt-get install python-scapy
On CentOS/RHEL, you need to enable EPEL repository first.
$ sudo yum install scapy
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.
$ unzip scapy-latest.zip $ cd scapy-2.* $ sudo python setup.py install
This website is made possible by minimal ads and your gracious donation via PayPal or credit card
Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.