mirror of https://github.com/secdev/scapy.git
Better installation instructions
- Removed useless depedencies (Windows) - Added more links through the doc's parts - Removed broken links - Markes scapy v1 as deprecated
This commit is contained in:
parent
2c0e14df1f
commit
56ffcb6ee4
|
@ -7,10 +7,10 @@ Download and Installation
|
|||
Overview
|
||||
========
|
||||
|
||||
0. Install *Python 2*.
|
||||
1. Download and install *Scapy*.
|
||||
2. (For non-Linux platforms): Install *libpcap and libdnet* and their Python wrappers.
|
||||
3. (Optional): Install *additional software* for special features.
|
||||
0. Install `Python 2.7.X <https://www.python.org/downloads/>`_.
|
||||
1. `Download and install Scapy. <#installing-scapy-v2-x>`_
|
||||
2. `Follow the platform specific instructions (depedencies) <#platform-specific-instructions>`_.
|
||||
3. (Optional): `Install additional software <#optional-packages>`_ for `special features <#optional-software-for-special-features>`_.
|
||||
4. Run Scapy with root privileges.
|
||||
|
||||
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.
|
||||
|
@ -45,12 +45,15 @@ Make sure you have Python installed before you go on.
|
|||
Latest release
|
||||
--------------
|
||||
|
||||
.. note::
|
||||
To get the latest versions, with bugsfixes and new features, but maybe not as stable, see the `development version <#current-development-version>`_.
|
||||
|
||||
Download the `latest version <http://scapy.net>`_ to a temporary directory and install it in the standard `distutils <http://docs.python.org/inst/inst.html>`_ way::
|
||||
|
||||
$ cd /tmp
|
||||
$ wget scapy.net
|
||||
$ unzip scapy-latest.zip
|
||||
$ cd scapy-2.*
|
||||
$ cd scapy
|
||||
$ sudo python setup.py install
|
||||
|
||||
Alternatively, you can execute the zip file::
|
||||
|
@ -106,8 +109,8 @@ Then you can always update to the latest version::
|
|||
$ sudo python setup.py install
|
||||
|
||||
|
||||
Installing Scapy v1.2
|
||||
=====================
|
||||
Installing Scapy v1.2 (Deprecated)
|
||||
==================================
|
||||
|
||||
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::
|
||||
|
@ -115,12 +118,6 @@ Just download the last version and run it with your Python interpreter::
|
|||
$ wget https://raw.githubusercontent.com/secdev/scapy/v1.2.0.2/scapy.py
|
||||
$ sudo python scapy.py
|
||||
|
||||
.. index::
|
||||
single: scapy-bpf
|
||||
|
||||
On BSD systems, you can also try the latest version of `Scapy-bpf <http://hg.natisbad.org/scapy-bpf/raw-file/tip/scapy.py>`_ (`development repository <http://hg.natisbad.org/scapy-bpf/>`_). It doesn't need libpcap or libdnet.
|
||||
|
||||
|
||||
Optional software for special features
|
||||
======================================
|
||||
|
||||
|
@ -131,7 +128,7 @@ Here are the topics involved and some examples that you can use to try if your i
|
|||
.. index::
|
||||
single: plot()
|
||||
|
||||
* Plotting. ``plot()`` needs `Gnuplot-py <http://gnuplot-py.sourceforge.net/>`_ which needs `GnuPlot <http://www.gnuplot.info/>`_ and `NumPy <http://numpy.scipy.org/>`_.
|
||||
* Plotting. ``plot()`` needs `Gnuplot-py <http://gnuplot-py.sourceforge.net/>`_ which needs `GnuPlot <http://www.gnuplot.info/>`_ and `NumPy <http://numpy.scipy.org/>`__.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
@ -190,7 +187,7 @@ Here are the topics involved and some examples that you can use to try if your i
|
|||
|
||||
* VOIP. ``voip_play()`` needs `SoX <http://sox.sourceforge.net/>`_.
|
||||
|
||||
* IPsec Crypto Support. ``SecurityAssociation()`` needs `Pycrypto 2.7a1<https://github.com/dlitz/pycrypto>`_. Combined AEAD modes such as GCM and CCM are not available yet because of cryptography restrictions.
|
||||
* IPsec Crypto Support. ``SecurityAssociation()`` needs `Pycrypto 2.7a1 <https://github.com/dlitz/pycrypto>`_. Combined AEAD modes such as GCM and CCM are not available yet because of cryptography restrictions.
|
||||
|
||||
Platform-specific instructions
|
||||
==============================
|
||||
|
@ -288,8 +285,8 @@ Here's how to install Scapy on OpenBSD 5.9+
|
|||
$ doas python2.7 setup.py install
|
||||
|
||||
|
||||
Optional packages
|
||||
^^^^^^^^^^^^^^^^^
|
||||
Optional packages (OpenBSD only)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
py-crypto
|
||||
|
||||
|
@ -358,13 +355,10 @@ Scapy is primarily being developed for Unix-like systems and works best on those
|
|||
You need the following software packages in order to install Scapy on Windows:
|
||||
|
||||
* `Python <http://www.python.org>`_: `python-2.7.12.msi <https://www.python.org/ftp/python/2.7.12/python-2.7.12.msi>`_. After installation, add the Python installation directory and its \Scripts subdirectory to your PATH. Depending on your Python version, the defaults would be ``C:\Python27`` and ``C:\Python27\Scripts`` respectively.
|
||||
* `Scapy <http://www.secdev.org/projects/scapy/>`_: `latest development version <https://github.com/secdev/scapy/archive/master.zip>`_ from the `Git repository <https://github.com/secdev/scapy>`_. Unzip the archive, open a command prompt in that directory and run "python setup.py install".
|
||||
* `pywin32 <https://sourceforge.net/projects/pywin32/files/pywin32/>`_: `pywin32-220.win-amd64-py2.7.exe <https://sourceforge.net/projects/pywin32/files/pywin32/Build%20220/pywin32-220.win-amd64-py2.7.exe>`_ (64bits) or `pywin32-220.win32-py2.7.exe <https://sourceforge.net/projects/pywin32/files/pywin32/Build%20220/pywin32-220.win32-py2.7.exe>`_ (32bits)
|
||||
* `WinPcap <http://www.winpcap.org/>`_: `WinPcap_4_1_3.exe <https://www.winpcap.org/install/bin/WinPcap_4_1_3.exe>`_. You might want to choose "[x] Automatically start the WinPcap driver at boot time", so that non-privileged users can sniff, especially under Vista and Windows 7. If you want to use the ethernet vendor database to resolve MAC addresses or use the ``wireshark()`` command, download `Wireshark <http://www.wireshark.org/>`_ which already includes WinPcap.
|
||||
* `pyreadline <https://pypi.python.org/pypi/pyreadline>`_: `pyreadline-2.1.win-amd64.exe <https://pypi.python.org/packages/8b/13/bed49b87af0b4f345b4e54897b5ab6a4b848e4dd300ec4195a0016b8650c/pyreadline-2.1.win-amd64.exe>`_ (64bits) or `pyreadline-2.1.win32.exe <https://pypi.python.org/packages/bc/ca/316035ec616c08979bbed47fb25b843415cf2d118a2f95f55173334300a6/pyreadline-2.1.win32.exe>`_ (32bits)
|
||||
* pypcap AND libdnet: `Available here <https://github.com/gpotter2/ScapyWindows2.7>`_
|
||||
|
||||
|
||||
* `pyreadline <https://pypi.python.org/pypi/pyreadline>`_: `pyreadline-2.1.win-amd64.exe <https://pypi.python.org/packages/8b/13/bed49b87af0b4f345b4e54897b5ab6a4b848e4dd300ec4195a0016b8650c/pyreadline-2.1.win-amd64.exe>`_ (64bits) or `pyreadline-2.1.win32.exe <https://pypi.python.org/packages/bc/ca/316035ec616c08979bbed47fb25b843415cf2d118a2f95f55173334300a6/pyreadline-2.1.win32.exe>`_ (32bits)
|
||||
* `Scapy <http://www.secdev.org/projects/scapy/>`_: `latest development version <https://github.com/secdev/scapy/archive/master.zip>`_ from the `Git repository <https://github.com/secdev/scapy>`_. Unzip the archive, open a command prompt in that directory and run "python setup.py install".
|
||||
|
||||
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 version that is supported (Python 2.7). If these links do not work or if you are using a different Python version (which will surely not work), just visit the homepage of the respective package and look for a Windows binary. As a last resort, search the web for the filename.
|
||||
|
@ -376,6 +370,9 @@ If really nothing seems to work, consider skipping the Windows version and using
|
|||
Optional packages
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note::
|
||||
If you are using OpenBSD, follow `this <#optional-packages-openbsd-only>`__ instead
|
||||
|
||||
1. (Recommanded) Auto install: Using pip
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
@ -430,7 +427,7 @@ Optional packages
|
|||
|
||||
Plotting (``plot``)
|
||||
|
||||
* `GnuPlot <http://www.gnuplot.info/>`_: `gp504-win64-mingw.exe <https://sourceforge.net/projects/gnuplot/files/gnuplot/5.0.4/gp504-win64-mingw.exe/download>`_ (64bits) or `gp504-win64-mingw.exe <https://sourceforge.net/projects/gnuplot/files/gnuplot/5.0.4/gp504-win32-mingw.exe/download>`_ (32bits).
|
||||
* `GnuPlot <http://www.gnuplot.info/>`_: `gp504-win64-mingw.exe <https://sourceforge.net/projects/gnuplot/files/gnuplot/5.0.4/gp504-win64-mingw.exe/download>`_ (64bits) or `gp504-win32-mingw.exe <https://sourceforge.net/projects/gnuplot/files/gnuplot/5.0.4/gp504-win32-mingw.exe/download>`_ (32bits).
|
||||
* `NumPy <http://www.numpy.org/>`_: `numpy-1.11.2.zip <https://sourceforge.net/projects/numpy/files/NumPy/1.11.2/numpy-1.11.2.zip/download>`_. Extract to temp dir, open command prompt, change to tempdir and type ``python setup.py install``. Gnuplot-py 1.8 needs NumPy.
|
||||
* `Gnuplot-py <http://gnuplot-py.sourceforge.net/>`_: `gnuplot-py-1.8.zip <http://downloads.sourceforge.net/project/gnuplot-py/Gnuplot-py/1.8/gnuplot-py-1.8.zip>`_. As numpy, use a tempdir.
|
||||
|
||||
|
@ -468,7 +465,7 @@ 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.sniff_promisc=False``.
|
||||
* Packets cannot be sent to localhost (or local IP addresses on your own host).
|
||||
* Packets sometimes 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.
|
||||
|
||||
|
||||
|
@ -487,6 +484,8 @@ The instructions to build the HTML version are: ::
|
|||
cd doc/scapy
|
||||
make html
|
||||
|
||||
Or on windows, simply run ``BuildDoc.bat``
|
||||
|
||||
You can now open the resulting HTML file ``_build/html/index.html`` in your favorite web browser.
|
||||
|
||||
To use the ReadTheDocs' template, you will have to install the corresponding theme with: ::
|
||||
|
|
Loading…
Reference in New Issue