Skip to content

Repository files navigation

scapy

  • This repository contains list of steps to get scapy running on Windows with Python 2.7.
  • All credits, rights, and thanks go to the respective application and code developers.
  • Please see scapy documentation for reference on installation, dependencies, and usage.
  • Please see each install, application, library, etc., for license agreements, and make sure you comply.

Pre-requisites

These steps were tested on Windows 8.1 64-bit. Currently using Visual Studio to compile some of the dependencies (may look for free alternatives later). Visual Studio could be skipped if installing only pre-compiled binaries.

You should have the following installed already:

PackageComments
Python 2.7Tested with 32-bit version
Visual Studio - use Microsoft Visual C++ Compiler for Python 2.7 OR get a licensed versionTested with VisualStudio 2013
pip or setuptoolsYou should consider using virtualenv
7zipOr a similar zip/tar.gz extraction utility
chocolateyRecommended for easy installation of dependencies

Note that you will have to run most/all of the installs from elevated privileges ('run as administrator').

Install Applications

Pick the add-ons you are planning to use.

Minimum requirement is npcap.

ApplicationChocolatery
npcap\
cryptography\
Graphvizchoco install Graphviz
Matplotlibchoco install matplotlib
imagemagickchoco install imagemagick.app
miktexchoco install miktex
wiresharkchoco install wireshark
nmapchoco install nmap
vpython
queso
tortoisehgchoco install tortoisehg
  • You can replace tortoisehg with command line version of hg, or later download scapy source as a zip file.
  • MikTex (and others) have to be installed to a path without space characters.
  • Add to the PATH any other application you installed. For example, for MikTex - add the (MikTek Install Dir)\miktex\bin subdirectory to your PATH.

Install Scapy Dependencies

Pick the add-ons you are planning to use. You will need at least: pyreadline, pcapy, and dnet.

From command line (pip / easy_install executables are usually under c:\python27\scripts):

  • pip install ipython (recommanded)
  • pip install cryptography
  • pip install matplotlib
  • pip install pyx==0.12.1

Note: pyx version 0.13 and above are for Python3. As of this writing, 0.12.1 is the latest for Python2.

Install Scapy

  • Get latest scapy source code from source, or as a zip file.

  • Open command prompt in the source folder and run: python setup.py install

  • Unzip queso (downloaded above) to your Scapy directory (C:\Python27\Lib\site-packages\scapy).

Test & Run

  • Run scapy.bat from (c:\python27\scripts).
  • If start up complains about missing dependencies - install them.
  • If you see an error about mismatch between pcap and dnet:
    • Try closing other sniffers and restart scapy.
    • Try re-installing winpcap and restart.
    • If still not working, have a look at 1, 2, 3.

Links

Final Words

  • Please leave a ticket if the above steps need to be update.
  • Please add a comment in the wiki on working configurations and additional tips on how to get there.

About

Scapy Install for Windows with Python 2.7

Resources

Stars

41 stars

Watchers

7 watching

Forks

Releases

Packages

Contributors