Skip to content

zlorb/scapy

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:

Package Comments
Python 2.7 Tested with 32-bit version
Visual Studio - use Microsoft Visual C++ Compiler for Python 2.7 OR get a licensed version Tested with VisualStudio 2013
pip or setuptools You should consider using virtualenv
7zip Or a similar zip/tar.gz extraction utility
chocolatey Recommended 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.

Application Chocolatery
npcap \
cryptography \
Graphviz choco install Graphviz
Matplotlib choco install matplotlib
imagemagick choco install imagemagick.app
miktex choco install miktex
wireshark choco install wireshark
nmap choco install nmap
vpython
queso
tortoisehg choco 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

Watchers

Forks

Releases

No releases published

Packages

No packages published