Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.1k
Scapy: the Python-based interactive packet manipulation program & library.
License
secdev/scapy
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Scapy is a powerful Python-based interactive packet manipulation program andlibrary.
It is able to forge or decode packets of a wide number of protocols, send themon the wire, capture them, store or read them using pcap files, match requestsand replies, and much more. It is designed to allow fast packet prototyping byusing default values that work.
It can easily handle most classical tasks like scanning, tracerouting, probing,unit tests, attacks or network discovery (it can replacehping
, 85% ofnmap
,arpspoof
,arp-sk
,arping
,tcpdump
,wireshark
,p0f
, etc.). It alsoperforms very well at a lot of other specific tasks that most other tools can'thandle, like sending invalid frames, injecting your own 802.11 frames, combiningtechniques (VLAN hopping+ARP cache poisoning, VoIP decoding on WEP protectedchannel, ...), etc.
Scapy supports Python 3.7+. It's intended tobe cross platform, and runs on many different platforms (Linux, OSX,*BSD, and Windows).
Scapy is usable either as ashell or as alibrary.For further details, please head over toGetting started with Scapy, which is part of the documentation.
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 togithub.com
, then display the reply source IP address:
sudo ./run_scapyWelcometoScapy>>>p=IP(dst="github.com")/ICMP()>>>r=sr1(p)Beginemission:.Finishedtosend1packets.*Received2packets,got1answers,remaining0packets>>>r[IP].src'192.30.253.113'
Thedocumentation contains moreadvanced use cases, and examples.
Other useful resources:
- Scapy in 20 minutes
- Interactive tutorial (part of the documentation)
- The quick demo: an interactive session (some examples may be outdated)
- HTTP/2 notebook
- TLS notebooks
Scapy works without any external Python modules on Linux and BSD like operatingsystems. On Windows, you need to install some mandatory dependencies asdescribed inthedocumentation.
On most systems, using Scapy is as simple as running the following commands:
git clone https://github.com/secdev/scapycd scapy./run_scapy
To benefit from all Scapy features, such as plotting, you might want to installPython modules, such asmatplotlib
orcryptography
. See thedocumentation andfollow the instructions to install them.
Scapy's code, tests and tools are licensed under GPL v2.The documentation (everything unless marked otherwise indoc/
, and except the logo) is licensed under CC BY-NC-SA 2.5.
Want to contribute? Great! Please take a few minutes toread this!
About
Scapy: the Python-based interactive packet manipulation program & library.
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.