https://github.com/secdev/scapy
Scapy: the Python-based interactive packet manipulation program & library.
https://github.com/secdev/scapy
hacktoberfest network network-analysis network-discovery network-security network-visualization packet-analyser packet-capture packet-crafting packet-sniffer pcap python scapy security security-tools
Last synced: about 1 month ago
JSON representation
Scapy: the Python-based interactive packet manipulation program & library.
- Host: GitHub
- URL: https://github.com/secdev/scapy
- Owner: secdev
- License: gpl-2.0
- Created: 2015-10-01T17:06:46.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2026-10-11T00:35:34.000Z (about 1 month ago)
- Last Synced: 2026-10-14T14:34:07.002Z (about 1 month ago)
- Topics: hacktoberfest, network, network-analysis, network-discovery, network-security, network-visualization, packet-analyser, packet-capture, packet-crafting, packet-sniffer, pcap, python, scapy, security, security-tools
- Language: Python
- Homepage: https://scapy.net
- Size: 83.6 MB
- Stars: 12,604
- Watchers: 221
- Forks: 2,266
- Open Issues: 144
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
- Agents: AGENTS.md
Awesome Lists containing this project
- awesome-python - scapy - A brilliant packet manipulation library. (Hardware)
- awesome-python - secdev/scapy - Scapy: the Python-based interactive packet manipulation program & library. (Networking and Distributed / Networking)
- awesome-vehicle-security - Scapy - A python library to send, receive, edit raw packets. Supports CAN and automotive protocols: see the [automotive doc](https://scapy.readthedocs.io/en/latest/layers/automotive.html) (Libraries and Tools / Python)
- Awesome-List - 'Scapy' network packet manipulation and forgery
- awesome-python - scapy - A brilliant packet manipulation library. (Hardware)
- awesome-security - scapy - Scapy: the python-based interactive packet manipulation program & library. (Network / Scanning / Pentesting)
- penetration-testing - scapy - Python-based interactive packet manipulation program and library. (Network Tools / Network Traffic Replay and Editing Tools)
- awesome-snmp - Scapy - Packet manipulation program & library. Scapy has a [module](https://github.com/secdev/scapy/blob/master/scapy/layers/snmp.py) to build/dissect SNMP packets.  (Libraries / Python)
- fucking-awesome-python-cn - scapy - :一个非常棒的操作数据包的库。 (资源列表 / 硬件)
- awesome-python-zh - scapy - 一个辉煌的数据包操作库。 (硬件)
- awesome-python - scapy - A brilliant packet manipulation library. (Hardware)
- awesome-reverse-engineering - Scapy - Python packet framework for dissecting and constructing protocols, reading PCAPs, and scripting network experiments. (Web and protocols / Books)
- awesome-connected-things-sec - Scapy CoAP Plugin
- python-awesome - scapy - A brilliant packet manipulation library. (Hardware)
- awesome-python - scapy - A brilliant packet manipulation library. (Hardware)
- awesome-starred - secdev/scapy - Scapy: the Python-based interactive packet manipulation program & library. Supports Python 2 & Python 3. (hacktoberfest)
- awesome-python-resources - GitHub - 2% open · ⏱️ 25.08.2022): (硬件)
- awesome-rea - Scapy - Script packet dissection, construction, request/reply matching and capture-file analysis in Python. <sub>Tool · [Full entry](https://awesomerea.org/resources/scapy/)</sub> (Resources / Protocol)
- awesome-python - scapy - A brilliant packet manipulation library. (Hardware)
- awesome-python - scapy - Scapy: the Python-based interactive packet manipulation program & library. Supports Python 2 & Python 3. ` 📝 3 days ago ` (Hardware [🔝](#readme))
- awesome-python - scapy - A brilliant packet manipulation library. (Hardware)
- fucking-awesome-python - scapy - A brilliant packet manipulation library. (Hardware)
- fucking-awesome-python - :octocat: scapy - :star: 8986 :fork_and_knife: 1883 - A brilliant packet manipulation library. (Hardware)
- venom - `scapy` - Python-based interactive packet manipulation program and library. (Network / Network Traffic Replay and Editing Tools)
- awesome-python - scapy - A brilliant packet manipulation library. (Hardware)
- fucking-awesome-pentest - scapy - Python-based interactive packet manipulation program and library. (Network Tools / Network Traffic Replay and Editing Tools)
- awesome-python-fa - **Scapy** - یک ابزار قدرتمند برای پردازش بستههای شبکه و انجام تستهای نفوذ. این کتابخانه به شما این امکان را میدهد که بستههای شبکه را دستکاری کنید، آنها را ارسال کنید و پاسخها را تجزیه و تحلیل کنید. Scapy برای کار با پروتکلهای شبکه و تست آسیبپذیریهای شبکه بسیار مفید است. (📚 فهرست / هک و امنیت)
- awesome-python-cn - scapy
- awesome-python - scapy - A brilliant packet manipulation library. (Hardware)
- git-github.com-vinta-awesome-python - scapy - A brilliant packet manipulation library. (Hardware)
- Python-Security-Tool-Database - Scapy - Python packet manipulation tool for a really solid number of protocols. (Synopsis / Table of Contents)
- fucking_awesome_python - scapy - A brilliant packet manipulation library. (Hardware)
- awesome-pentest - scapy - Python-based interactive packet manipulation program & library. (Network Tools / Docker Containers of Penetration Testing Distributions and Tools)
- awesome-pentest - scapy - Python-based interactive packet manipulation program and library. (Network Tools / Network Traffic Replay and Editing Tools)
- awesome-penetest - scapy - Python-based interactive packet manipulation program and library. (Network Tools / Network Traffic Replay and Editing Tools)
- github-ultimate-repos - secdev/scapy - | ⭐ 12,650★ | 🍴 2,283 | 💻 `Python`🔗 <https://github.com/secdev/scapy>📝 Scapy: the Python-based interactive packet manipulation program & library.⚙️ `Binary PE/ELF parsing -> recursive-descent disassembly to intermediate IL (P-Code/ESIL) -> CFG dominator tree reconstruction -> network packet synthesis & vulnerability triage.` (📜 Master Categorized Repository Directory (100% Clickable Links) / [30] CYBERSECURITY, REVERSE ENGINEERING, BINARY EXPLOITATION & VULNERABILITY RESEARCH)
- awesome-pentest - scapy - Python-based interactive packet manipulation program and library. (Network Tools / Network Traffic Replay and Editing Tools)
- awesome-pentest-reference - scapy - Python-based interactive packet manipulation program and library. (Network Tools / Network Traffic Replay and Editing Tools)
- awesome - secdev/scapy - Scapy: the Python-based interactive packet manipulation program & library. (Python)
- awesome-pentest - scapy - Python-based interactive packet manipulation program & library. (Tools / Network Tools)
- awesome-network-stuff - secdev/scapy - 交互式数据包操作, Python, 命令行+库 (Scapy)
- awesome-canbus - Scapy - Python-based interactive packet manipulation program & library. Supports CAN/ISOTP/UDS/GMLAN plus many other protocols. (Hacking and Reverse Engineering tools)
- Python-Awesome - scapy - A brilliant packet manipulation library. (Hardware)
- awesome-python - scapy - <img src="assets/star.png" width="16" /> 3603 <img src="assets/license.png" width="16" /> [GPL-2.0](https://api.github.com/licenses/gpl-2.0)\- Scapy: the Python-based interactive packet manipulation program & library. Supports Python 2 & Python 3. (Awesome Python / Hardware)
README
#
Scapy
[](https://github.com/secdev/scapy/actions/workflows/unittests.yml?query=event%3Apush)
[](https://codecov.io/gh/secdev/scapy)
[](https://app.codacy.com/gh/secdev/scapy/dashboard)
[](https://pypi.python.org/pypi/scapy/)
[](LICENSE)
[](https://gitter.im/secdev/scapy)
Scapy is a powerful Python-based interactive packet manipulation program and
library.
It is able to forge or decode packets of a wide number of protocols, send them
on the wire, capture them, store or read them using pcap files, match requests
and replies, and much more. It is designed to allow fast packet prototyping by
using default values that work.
It can easily handle most classical tasks like scanning, tracerouting, probing,
unit tests, attacks or network discovery (it can replace `hping`, 85% of `nmap`,
`arpspoof`, `arp-sk`, `arping`, `tcpdump`, `wireshark`, `p0f`, etc.). It also
performs very well at a lot of other specific tasks that most other tools can't
handle, like sending invalid frames, injecting your own 802.11 frames, combining
techniques (VLAN hopping+ARP cache poisoning, VoIP decoding on WEP protected
channel, ...), etc.
Scapy supports Python 3.7+. It's intended to
be cross platform, and runs on many different platforms (Linux, OSX,
\*BSD, and Windows).
## Getting started
Scapy is usable either as a **shell** or as a **library**.
For further details, please head over to [Getting started with Scapy](https://scapy.readthedocs.io/en/latest/introduction.html), which is part of the documentation.
### Shell demo

Scapy can easily be used as an interactive shell to interact with the network.
The following example shows how to send an ICMP Echo Request message to
`github.com`, then display the reply source IP address:
```python
sudo ./run_scapy
Welcome to Scapy
>>> p = IP(dst="github.com")/ICMP()
>>> r = sr1(p)
Begin emission:
.Finished to send 1 packets.
*
Received 2 packets, got 1 answers, remaining 0 packets
>>> r[IP].src
'192.30.253.113'
```
### Resources
The [documentation](https://scapy.readthedocs.io/en/latest/) contains more
advanced use cases, and examples.
Other useful resources:
- [Scapy in 20 minutes](https://github.com/secdev/scapy/blob/master/doc/notebooks/Scapy%20in%2015%20minutes.ipynb)
- [Interactive tutorial](https://scapy.readthedocs.io/en/latest/usage.html#interactive-tutorial) (part of the documentation)
- [The quick demo: an interactive session](https://scapy.readthedocs.io/en/latest/introduction.html#quick-demo) (some examples may be outdated)
- [HTTP/2 notebook](https://github.com/secdev/scapy/blob/master/doc/notebooks/HTTP_2_Tuto.ipynb)
- [TLS notebooks](https://github.com/secdev/scapy/blob/master/doc/notebooks/tls)
## [Installation](https://scapy.readthedocs.io/en/latest/installation.html)
Scapy works without any external Python modules on Linux and BSD like operating
systems. On Windows, you need to install some mandatory dependencies as
described in [the
documentation](http://scapy.readthedocs.io/en/latest/installation.html#windows).
On most systems, using Scapy is as simple as running the following commands:
```bash
git clone https://github.com/secdev/scapy
cd scapy
./run_scapy
```
To benefit from all Scapy features, such as plotting, you might want to install
Python modules, such as `matplotlib` or `cryptography`. See the
[documentation](http://scapy.readthedocs.io/en/latest/installation.html) and
follow the instructions to install them.
## Packaging status
[](https://repology.org/project/scapy/versions)
## License
Scapy's code, tests and tools are licensed under GPL v2.
The documentation (everything unless marked otherwise in `doc/`, and except the logo) is licensed under CC BY-NC-SA 2.5.
## Contributing
Want to contribute? Great! Please take a few minutes to
[read this](CONTRIBUTING.md)!