Installing Scapy

At the time of this writing, Scapy 2.3.1 supported Python 2.7. While attempts and forks has been done for the Python 3 support, it is still a prototype (in Phil's own words), so we will use Python 2.7 for our usage. The idea is that Scapy 3 will be Python 3 only and will not be backward compatible to Scapy 2.x.

If you are interested in testing out the Scapy 3 prototype, here is the latest version: https://bitbucket.org/secdev/scapy3-prototype2. If you want to learn more about the issue and the fork, here is the issue Bitbucket link: https://bitbucket.org/secdev/scapy/issues/5082/compatibility-with-python-3.

In our lab, since we are crafting packets going from the client to the server, Scapy needs to be installed on the client:

cisco@Client:~$ sudo apt-get update
cisco@Client:~$ sudo apt-get install git
cisco@Client:~$ git clone https://github.com/secdev/scapy
cisco@Client:~$ cd scapy/
cisco@Client:~/scapy$ sudo python setup.py install

Here is a quick test to make sure the packages installed correctly:

cisco@Client:~/scapy$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from scapy.all import *
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.81.43