Sniffing & Spoofingpacketmanipulationsnifferscannernetworkdiscoverypython

scapy

Scapy is a powerful interactive packet manipulation tool, packet generator, network scanner, network discovery tool, and packet sniffer. It can replace tools like hping, most of nmap, arpspoof, and tcpdump.

Description

Scapy is a powerful interactive packet manipulation tool, packet generator, network scanner, network discovery tool, and packet sniffer. It can for the moment replace hping, 85% of nmap, arpspoof, arp-sk, arping, tcpdump, tethereal, p0f, and more.

In scapy you define a set of packets, then it sends them, receives answers, matches requests with answers and returns a list of packet couples (request, answer) and a list of unmatched packets. This has the big advantage over tools like nmap or hping that an answer is not reduced to (open/closed/filtered), but is the whole packet.

This package contains the Python 3 version of the library and scapy executable.

How It Works

Scapy operates by allowing users to define a set of packets which it then sends and receives. It matches requests with answers, returning a list of packet couples (request, answer) and unmatched packets. Unlike tools like nmap or hping, Scapy provides the complete packet response rather than simplified states like open/closed/filtered.

Installation

bash
sudo apt install python3-scapy

Flags

-Hheader-less start
-Cdo not read startup file
-Pdo not read pre-startup file
-c new_startup_fileuse new startup file
-p new_prestart_fileuse new pre-startup file

Examples

Display help for scapy interactive packet manipulation tool
scapy -h
Display help for scapy3
scapy3 -h
Launch scapy interactive packet manipulation tool
scapy
Start scapy with header-less mode
scapy -H
Start scapy without reading startup file
scapy -C
Start scapy without reading pre-startup file
scapy -P
Launch scapy3 Python 3 version
scapy3
Updated 2026-04-16kali.org ↗