fromscapy.allimport*
instead of fromscapyimport*
.Bundle | Contains | Pip command |
---|---|---|
Default | Only Scapy | pipinstallscapy |
Basic | Scapy & IPython. Highly recommended | pipinstall--prescapy[basic] |
Complete | Scapy & all its main dependencies | pipinstall--prescapy[complete] |
run_scapy
(unix) or run_scapy.bat
(Windows) script or running it directly from the executable zip file (see the previous section).pip
.Here are the topics involved and some examples that you can use to try if your installation was successful.plot()
needs Matplotlib.pipinstallmatplotlib
psdump()
and pdfdump()
need PyX which in turn needs a LaTeX distribution: texlive (Unix) or MikTex (Windows).pipinstallpyx0.12.1
. Otherwise pipinstallpyx
conversations()
needs Graphviz and ImageMagick.Graphviz
and ImageMagick
need to be installed separately, using your platform-specific package manager.trace3D()
needs VPython-Jupyter.pipinstallvpython
unwep()
needs cryptography. Example using a Weplap test file:pipinstallcryptography
nmap_fp()
needs Nmap. You need an old version (before v4.23) that still supports first generation fingerprinting.voip_play()
needs SoX.-dddoption
))CONFIG_PACKET
)CONFIG_FILTER
)pip
or apt
(bundled under python-scapy
)All dependencies may be installed either via the platform-specific installer, or via PyPI. See Optional Dependencies for more information.pip
or pkg_add
(bundled under python-scapy
)All dependencies may be installed either via the platform-specific installer, or via PyPI. See Optional Dependencies for more information.libpcap
(installed by default) to work.C:Python27
and C:Python27Scripts
respectively.pythonsetup.pyinstall
.Npcap
, Scapy will work with 802.11
option enabled. You might want to make sure that this is ticked when installing).scapy
. If you have set the PATH correctly, this will find a little batch file in your C:Python27Scripts
directory and instruct the Python interpreter to load Scapy.conf.sniff_promisc=False
.Winpcap
is becoming old, it’s recommended to use Npcap
instead. Npcap
is part of the Nmap
project.Npcap
.'WinpcapisinstalledoverNpcap.'
it means that you have installed both Winpcap and Npcap versions, which isn’t recommended.Npcap
instead, as those files are not removed by the Winpcap
un-installer.'TheinstalledWindumpversiondoesnotworkwithNpcap'
it surely means that you have installed an old version of Windump
, made for Winpcap
.Download the correct one on https://github.com/hsluoyz/WinDump/releasesNpcap
and Winpcap
, and that Windump
is using Winpcap
. Fully delete Winpcap
using the above method to solve the problem._build/html/index.html
in your favorite web browser.pyreverse
you can build a UML representation of the Scapy source code’s object hierarchy. Here is anexample of how to build the inheritance graph for the Fields objects :classes_fields.png
picture containing the inheritance hierarchy. Note that you can provide as manymodules or packages as you want, but the result will quickly get unreadable.packages_dhcp_ans.png
showing the link between the different python modules provided.$GOPATH
is defined and $GOPATH/bin
is in $PATH
./usr/local/bin/bettercap
:go/bin/bettercap
.