Scapy-9f129e58640a.zip installation.rst installation.rst, change:2009-05-06,size:15899b. Highlight:: sh. Download and Installation. Overview 0. Install.Python 2.5. Download and install.Scapy.
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). Download and Installation Overview. Install Python 2.7.X or 3.4+.; Download and install Scapy. Follow the platform-specific instructions (dependencies). (Optional): Install additional software for special features. Run Scapy with root privileges.
(For non-Linux platforms): Install.libpcap and libdnet. and their Python wrappers. (Optional): Install.additional software. for special features. Run Scapy with root priviledges. Each of these steps can be done in a different way dependent on your platform and on the version of Scapy you want to use. At the moment, there are two different versions of Scapy:.Scapy v1.x.
It consists of only one file and works on Python 2.4, so it might be easier to install. Moreover, your OS may already have a specially prepared packages or ports for it. Last version is v1.2.2.Scapy v2.x.
The current development version adds several features (e.g. It consists of several files packaged in the standard distutils way. Scapy v2 needs Python 2.5. Note:: In Scapy v2 use ``from scapy.all import.`` instead of ``from scapy import.``. Installing Scapy v2.x The following steps describe how to install (or update) Scapy itself.
Dependent on your platform, some additional libraries might have to be installed to make it actually work. So please also have a look at the platform specific chapters on how to install those requirements. Note:: The following steps apply to Unix-like operating systems (Linux, BSD, Mac OS X). For Windows, see the special chapter below.
Make sure you have Python installed before you go on. Latest release - Download the `latest version ` to a temporary directory and install it in the standard `distutils ` way:: $ cd /tmp $ wget scapy.net $ unzip scapy-latest.zip $ cd scapy-2.
$ sudo python setup.py install Alternatively, you can make the zip file executable, move it to a directory in your PATH and run it directly:: $ chmod +x scapy-latest.zip $ mv scapy-latest.zip /usr/local/bin/scapy $ sudo scapy Current development version -. Index:: single: Mercurial, repository If you always want the latest version with all new features and bugfixes, use Scapy's Mercurial repository: 1. Install the `Mercurial ` version control system. For example, on Debian/Ubuntu use:: $ sudo apt-get install mercurial or on OpenBSD:: $ pkgadd mercurial 2. Check out a clone of Scapy's repository:: $ hg clone 3.
Install Scapy in the standard distutils way:: $ cd scapy $ sudo python setup.py install Then you can always update to the latest version:: $ hg pull $ hg update $ sudo python setup.py install For more information about Mercurial, have a look at the `Mercurial book `. Installing Scapy v1.2 As Scapy v1 consists only of one single Python file, installation is easy: Just download the last version and run it with your Python interpreter:: $ wget $ sudo python scapy.py. Index:: single: scapy-bpf On BSD systems, you can also try the latest version of `Scapy-bpf ` (`development repository `).
It doesn't need libpcap or libdnet. Optional software for special features For some special features you have to install more software. Platform-specific instructions on how to install those packages can be found in the next chapter. Here are the topics involved and some examples that you can use to try if your installation was successful. Index:: single: plot. Plotting. ``plot`` needs `Gnuplot-py ` which needs `GnuPlot ` and `NumPy `.
Code-block:: python p=sniff(count=50) p.plot(lambda x:len(x)). 2D graphics. ``psdump`` and ``pdfdump`` need `PyX ` which in turn needs a `LaTeX distribution `.
For viewing the PDF and PS files interactively, you also need `Adobe Reader ` (``acroread``) and `gv ` (``gv``). Code-block:: python p=IP/ICMP p.pdfdump('test.pdf'). Graphs. ``conversations`` needs `Grapviz ` and `ImageMagick `. Code-block:: python p=readpcap('myfile.pcap') p.conversations(type='jpg', target=' test.jpg'). 3D graphics. ``trace3D`` needs `VPython `.
Code-block:: python a,u=traceroute('www.python.org', 'google.com','slashdot.org') a.trace3D. Index:: single: WEP, unwep. WEP decryption.
``unwep`` needs `PyCrypto `. Example using a `Weplap test file `:. Code-block:: python enc=rdpcap('weplab-64bit-AA-managed.pcap') enc.show enc0 conf.wepkey='AA x00 x00 x00' dec=Dot11PacketList(enc).toEthernet dec.show dec0. Fingerprinting. ``nmapfp`` needs `Nmap `. You need an `old version ` (before v4.23) that still supports first generation fingerprinting.
Code-block:: python nmapfp('192.168.0.1') Begin emission: Finished to send 8 packets. Received 19 packets, got 4 answers, remaining 4 packets (0.9999996, 'Draytek Vigor 2000 ISDN router'). Index:: single: VOIP. VOIP.
``voipplay`` needs `SoX `. Platform-specific instructions Linux native - Scapy can run natively on Linux, without libdnet and libpcap.
Install `Python 2.5 `. Install `tcpdump ` and make sure it is in the $PATH.
(It's only used to compile BPF filters (``-ddd option``)). Make sure your kernel has Packet sockets selected (``CONFIGPACKET``). If your kernel is Scapy is primarily being developed for Unix-like systems and works best on those platforms. But a special port (Scapy-win) exists that allows you to use nearly all of Scapy's features on your Windows machine as well. Note:: At the moment, only Scapy v1.2.x works on Windows. Scapy v2 might be ported in the future. Image:: graphics/scapy-win-screenshot1.png:scale: 80:align: center You need the following software packages in order to install Scapy on Windows:.
`Python `: `python-2.5.2.msi `. I'm using Python 2.5. Scapy-win will work with Python 2.4 as well, but you will need all third-party extensions on this page compiled for v2.4.
`Scapy-win `: `latest version from the Mercurial repository `. Right click and save to ``C: Python25 Lib site-packages scapy.py``, or adjust to match your Python install directory. `pywin32 `: `pywin32-210.win32-py2.5.exe `. `WinPcap `: `WinPcap402.exe `. Or if you want to use the ethernet vendor database to resolve MAC addresses, download `Wireshark ` which already includes WinPcap.
`pypcap `: `pcap-1.1-scapy.win32-py2.5.exe `. This is a.special version for Scapy., as the original leads to some timing problems. For background info look on the `Wiki `. `libdnet `: `dnet-1.12.win32-py2.5.exe `. `pyreadline `: `pyreadline-1.5-win32-setup.exe ` Just download the files and run the setup program. Choosing the default installation options should be safe. For your convenience direct links are given 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. 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 interactive demo and the other documents on 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 grml and 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 ^^^^^^^^^^^^^^^^^ Plotting (``plot``). `GnuPlot `: `gp420win32.zip `. Extract the zip file (e.g. To ``c: gnuplot``) and add the ``gnuplot bin`` directory to your PATH. `Numeric `: `Numeric-24.2.win32-py2.5.exe `. Gnuplot-py needs Numeric.
`Gnuplot-py `: `gnuplot-py-1.7.zip `. Extract to temp dir, open command prompt, change to tempdir and type ``python setup.py install``. 2D Graphics (``psdump``, ``pdfdump``). `PyX `: `PyX-0.10.tar.gz `PyX-0.10.tar.gz `. Extract to temp dir, open command prompt, change to tempdir and type ``python setup.py install``. `MikTeX `: `basic-miktex-2.6.2742.exe (52 MB) `. PyX needs a LaTeX installation.
Choose an installation directory WITHOUT spaces (e.g. ``C: MikTex2.6`` and add the ``(INSTALLDIR) miktex bin`` subdirectory to your PATH. Graphs (conversations). `Graphviz `: `graphviz-2.12.exe `. Add ``(INSTALLDIR) ATT Graphviz bin`` to your PATH. 3D Graphics (trace3d). `VPython `: `VPython-Win-Py2.5-3.2.11.exe ` WEP decryption.
`PyCrypto `: `pycrypto-2.0.1.win32-py2.5.zip ` Fingerprinting. `Nmap `. `nmap-4.20-setup.exe `.
If you use the default installation directory, Scapy-win should automatically find the fingerprints file. Queso: `queso-980922.tar.gz `. Extract the tar.gz file (e.g. Using `7-Zip `) and put ``queso.conf`` into your Scapy directory Screenshot ^^^^^^^^^^. Image:: graphics/scapy-win-screenshot2.png:scale: 80:align: center Known bugs ^^^^^^^^^^.
You may not be able to capture WLAN traffic on Windows. Reasons are explained on the Wireshark wiki and in the WinPcap FAQ. Try switching off promiscuous mode with ``conf.sniffpromisc=False``. Packets cannot be sent to localhost (or local IP addresses on your own host). The ``voipplay`` functions do not work because they output the sound via ``/dev/dsp`` which is not available on Windows.
Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |