Scapy

Interactive packet manipulation in Python.

KaliParrotLinuxmedium

pkg: python3-scapy

Scapy crafts, sends, sniffs and dissects packets programmatically — the ultimate DIY networking tool.

Syntax

scapy (or import scapy in Python)

Example

sr1(IP(dst="1.1.1.1")/ICMP())

Sends one ICMP echo and returns the reply packet.

Advantages
  • Total protocol control
  • Scriptable in Python
Disadvantages
  • Coding required
  • Slower for bulk traffic
Tags
#packet-crafting#python

Official docs: Scapy

Related commands

Frequently asked questions

What is Scapy used for?
Scapy crafts, sends, sniffs and dissects packets programmatically — the ultimate DIY networking tool.
What is an example Scapy command?
A common example is: sr1(IP(dst="1.1.1.1")/ICMP()) — Sends one ICMP echo and returns the reply packet.
Is Scapy part of Kali Linux?
Yes. Scapy ships with Kali Linux (and Parrot OS). If missing, install it with: sudo apt install python3-scapy.
What category of security tool is Scapy?
Scapy is a Sniffing & Spoofing tool with a medium-risk profile when run against a live target.

Try recon tools live

Run real scans against a domain you control, stage by stage.

Open the lab →