Installing Scapy On Windows (HTTP://WWW - secdev.org/Projects/Scapy
Installing Scapy On Windows (HTTP://WWW - secdev.org/Projects/Scapy
There are some glitches and known bugs though. Not everything works as nicely as
on Linux yet.
== Download ==
You need the following software packages in order to install Scapy on Windows.
Just download the files and run the setup program. Choosing the default
installation options should be safe.
For your convenience I have given direct links to the versions I used (for Python
2.5). If these links do not work or if you are using a different Python version,
just visit the homepage of the respective package and look for a Windows binary.
As a last resort, search the web for the filename. Or use the (somewhat older)
Scapy version that Andrew Evans has compiled: His
[http://www.techshinobi.de/software/scapyandpack.zip zip file] includes the basic
packages that you will need to run Scapy on Python 2.4.
After all packages are installed, open a command prompt (cmd.exe), change to the
directory containing scapy.py and run Scapy with "python scapy.py" (or just
"scapy.py"). For usage information see the
[http://www.secdev.org/projects/scapy/demo.html interactive demo] and the other
documents on [http://www.secdev.org/projects/scapy/ Scapy's homepage].
If really nothing seems to work, consider skipping the Windows version and using
Scapy from a Linux Live CD -- either in a virtual machine on your Windows host or
by booting from CDROM: Scapy is already included in [http://grml.org/ grml] and
[http://www.remote-exploit.org/backtrack.html BackTrack] for example. While using
the Live CD you can easily upgrade to the lastest Scapy version (for Unix) by
typing "cd /tmp && wget scapy.net".
== Optional packages ==
* [http://www.gnuplot.info/ GnuPlot]:
[http://downloads.sourceforge.net/gnuplot/gp420win32.zip gp420win32.zip]. Extract
the zip file (e.g. to c:\gnuplot) and add the gnuplot\bin directory to your PATH.
* [http://numpy.scipy.org/ Numeric]: [http://biopython.org/DIST/Numeric-
24.2.win32-py2.5.exe Numeric-24.2.win32-py2.5.exe]. Gnuplot-py needs Numeric.
* [http://gnuplot-py.sourceforge.net/ Gnuplot-py]:
[http://mesh.dl.sourceforge.net/sourceforge/gnuplot-py/gnuplot-py-1.7.zip gnuplot-
py-1.7.zip]. Extract to temp dir, open command prompt, change to tempdir and type
"python setup.py install".
Example:
{{{
>>> p=sniff(count=50)
>>> p.plot(lambda x:len(x))
}}}
* [http://pyx.sourceforge.net/ Pyx]:
[http://mesh.dl.sourceforge.net/sourceforge/pyx/PyX-0.9.tar.gz PyX-0.9.tar.gz].
Extract to temp dir, open command prompt, change to tempdir and type "python
setup.py install"
* [http://miktex.org/ MikTex]: [http://prdownloads.sourceforge.net/miktex/basic-
miktex-2.6.2742.exe?download basic-miktex-2.6.2742.exe] (52MB). Pyx needs a LaTeX
installation. Choose an installation directory WITHOUT spaces (e.g. C:\!MikTex2.6)
and add (INSTALLDIR)\miktex\bin subdirectory to your PATH.
Example:
{{{
>>> p=IP()/ICMP()
>>> p.pdfdump("test.pdf")
}}}
* [http://www.graphviz.org/ Graphviz]:
[http://www.graphviz.org/pub/graphviz/ARCHIVE/graphviz-2.12.exe graphviz-
2.12.exe]. Add (INSTALLDIR)\ATT\Graphviz\bin to your PATH.
Example:
{{{
>>> p=readpcap("myfile.pcap")
>>> p.conversations(type="jpg", target="> test.jpg")
}}}
Example:
{{{
>>> a,u=traceroute(["www.python.org", "google.com","slashdot.org"])
>>> a.trace3D()
}}}
* [http://www.amk.ca/python/code/crypto Pycrypto]:
[http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?file=pycrypto-
2.0.1.win32-py2.5.zip pycrypto-2.0.1.win32-py2.5.zip]
{{{
>>> enc=rdpcap("weplab-64bit-AA-managed.pcap")
>>> enc.show()
>>> enc[0]
>>> conf.wepkey="AA\x00\x00\x00"
>>> dec=Dot11PacketList(enc).toEthernet()
>>> dec.show()
>>> dec[0]
}}}
* [http://insecure.org/nmap/ Nmap].
[http://download.insecure.org/nmap/dist/nmap-4.20-setup.exe nmap-4.20-setup.exe].
If you use the default installation directory, Scapy-win should automatically find
the fingerprints file.
* Queso: [http://www.packetstormsecurity.org/UNIX/scanners/queso-980922.tar.gz
queso-980922.tar.gz]. Extract the tar.gz file (e.g. using [http://www.7-zip.org/
7-Zip]) and put queso.conf into your Scapy directory
{{{
>>> nmap_fp("192.168.0.1")
Begin emission:
Finished to send 8 packets.
== Known bugs ==
* Packets cannot be sent to localhost (or local IP addresses on your own host).
* The voip_play() functions do not work because they output the sound via
/dev/dsp which is not available on Windows.
* No color prompt in Scapy's interactive console, because ANSI color codes are
not supported on Windows NT based systems.
== Credits ==