freshcrate
Home > RAG & Memory > scapy

scapy

Scapy: interactive packet manipulation tool

Description

# <img src="https://github.com/secdev/scapy/raw/master/doc/scapy/graphics/scapy_logo.png" width="64" valign="middle" alt="Scapy" />&nbsp;&nbsp; Scapy [![PyPI Version](https://img.shields.io/pypi/v/scapy.svg)](https://pypi.python.org/pypi/scapy/) [![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](LICENSE) 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 install demo](https://secdev.github.io/files/doc/animation-scapy-install.svg) 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.

Release History

VersionChangesUrgencyDate
2.7.0Imported from PyPI (2.7.0)Low4/21/2026
v2.7.0*Hi everyone & Merry Christmas ! This release brings many new features, bug fixes and cleanups. If you encounter any issues when trying it out, please submit bug reports !* ### Deprecation notice - This version will be **the last to support Python 3.7 and 3.8**. (PEP639 will require a new license format starting in 2026, which isn't supported in the latest version of setuptools available on those older versions of Python.) # Changelog - **[new]** **_ForwardMachine_**: a new Scapy feaLow12/26/2025
v2.6.1This update contains fixes for various small bugs introduced in v2.6.0: - On linux machines with IPv6 disabled, Scapy would crash on startup (#4541) - The `scapy.1` manpage was no longer installed (#4549) - Upon the first startup, there could be a crash related to the creation of Scapy's `XDG-*` related folders. (#4558) - other small bugs that could lead to issues during packaging. Thanks to the downstream package maintainers for their help. ### Please have a look at the [**full v2.6.0 Low11/5/2024
v2.6.0_Note to package maintainers: it is important to point out that special care should be taken when porting/testing this release. The plateform-specific code aimed at reading the network configuration (interfaces, routes, etc.) has been entirely rewritten on both Linux and *BSD flavors. Plateforms that were tested include: Linux, OpenBSD, NetBSD, FreeBSD, Darwin. Other plateforms have not been tested, therefore we encourage maintainers to perform additional testing. This has no impact on the otherLow9/28/2024
v2.5.0# Changelog Scapy v2.5.0 is the last version to support Python 2.7 ## Main Changes - **Type hinting of Scapy core**: Scapy now provides type hintings for [all of its core](https://github.com/secdev/scapy/issues/2158) - **Python 3.9 and 3.10 support** - macOS 10.15 support - update built-in dependencies (six) + and our cryptography imports that created warnings - fix sniffing performance issues with 2.4.4+ on Windows - greatly improve BPF (macOS) support (timestamps...) - enhanced Low12/25/2022
v2.4.5# Main Changes ## Changelog ### Core - [354 commits to master](https://github.com/secdev/scapy/compare/v2.4.4...v2.4.5) since v2.4.4, from 73 contributors - **Python 3.9 support** - New interfaces system. `conf.iface` is now an object (retro-compatible as a string) which contains additional information about the interface and allows for an automatic selection of the socket type. `conf.ifaces` now lists all available interfaces. - Fix *BSD support. Improve filters handling on Linux anLow4/19/2021
v2.4.4# Main Changes # Core - [784 commits to master](https://github.com/secdev/scapy/compare/v2.4.3...v2.4.4) since this v2.4.3 - fix how timestamps are measured on layer 3 (broken since 2.4.1) - drop DNET support (deprecated since 2.4.0) - Scapy will now use `libpcap` instead of `tcpdump` to compile the filters (`tcpdump` is still used to filter pcaps) - major changes to the online doc: add an automatically generated [API reference](https://scapy.readthedocs.io/en/latest/api/scapy.html) wiLow9/2/2020
v2.4.3# Main Changes # Core - 364 commits since v2.4.2 - better native support for FreeBSD, NetBSD, OpenBSD - Windows: native RAW sockets support, load interfaces/routes using C calls, ... - Solaris: fixed support - latency improvements - `sniff()` can be used to test BPF fiters on pcap files - more unit tests and Python3 compatibility - asynchronous sniffing - UTScapy vim syntax highlighting - drop distutils for setuptools - Console / IPython integration improvements # Layers ##Low8/6/2019
v2.4.2# Main changes - Gabriel Potter is officially part of the Scapy maintainers team - PEP08 compliance (see #1277) - Speed improvements (see #642) # Core - 253 merged pull requests since v2.4.0 - Python 3.7 support - Enhanced Windows support - unit testing is now 100% tox based # Layers ## Major changes - Many automotive related layers added (ISO-TP...) ## New - EtherCat - OPCDA - SOCKS - USBpcap - RPKI ## Improved - MACsec, MQTT, MPLS, DNS, ARP, Dot15d4, ZigbLow1/11/2019
v1.0.4.106This release adds easy packet list filtering (e.g., list[ICMP]), bluetooth HCI protocol support, an improved show() for PacketFields, a LaTeX theme that escapes special characters, a timeout to sniff(), an equality test, a 3D traceroute, and bugfixes. It no longer depends on libreadline.Low6/26/2018
v1.0.5.20This release has improved fuzzing capability with frame random corruption. It has improved ISAKMP support. New protocols have been added. Autofragmentation for big frames has been added. There are many bugfixes.Low6/26/2018
v2.2.0**Note: all releases tags before 2.4.0 are imported from http://freshmeat.sourceforge.net/projects/scapy** This release adds a contrib section filled with old contributions that were not distributed with Scapy yet: CDP, IGMP, MPLS, CHDLC, SLARP, WPA EAPOL, DTP, EIGRP, VQP, BGP, OSPF, VTP RSVP, EtherIP, RIPng, and IKEv2. It fixes some bugs.Low6/26/2018
v2.1.1This release adds SCTP and VRRP protocols. It fixes some bugs.Low6/26/2018
v2.1.0The Windows branch has been merged. Many bugs have been fixed. Network automata gained new features like the ability to add breakpoints or tracepoints. Many new small features have been added. Last but not least, this release comes with documentation.Low6/26/2018
v2.0.0.10The code has been split since versions 1.x. Many bugs have been fixed. The IPv6 branch has been merged in.Low6/26/2018
v1.1.1This release adds the ability to transcribe ASN1-specified protocols easily, SNMP protocol support, MIB parsing, OID/DNS/OUI resolving, configurable field value resolution, a startup script, and srflood() and srpflood() to flood with packets while catching answers.Low6/26/2018
v2.4.0## Main changes - Python3 support - 85% code coverage ## Core - Pcap/PcapNg improvements - enhanced Windows support - OpenBSD improvements - OSX 802.11 monitor mode - Krack AP module - iPython support - automatically tested on Linux, OSX & Windows - ... ## Layers ### Major changes TLS (including TLS1.3), X.509 ... ### New HTTP/2, EAP-TTLS, TACACS, MQTT ... ### Improved IPv6, SCTP, NTP, PPTP, CDP, BGP, ISIS ...Low3/27/2018

Dependencies & License Audit

Loading dependencies...

Similar Packages

azure-search-documentsMicrosoft Azure Cognitive Search Client Library for Pythonazure-template_0.1.0b6187637
apache-tvm-ffitvm ffi0.1.10
luqumA Lucene query parser generating ElasticSearch queries and more !1.0.0
torchaoPackage for applying ao techniques to GPU models0.17.0
banksA prompt programming language2.4.1