Gentoo, W3AF, Python and scapy

Hello there,

In this little tutorial, I will show how install scapy to coexists with multiple versions of python under gentoo linux.

The “big”problem is that W3AF is designed to run under python 2.6. and sometimes your default python can be other.

You can check which versions of python your system have typing:

# eselect python list

Well as set which will be your default.

By example: your default python is: 2.7, so if you compile scapy , it will be optimezed to be used with 2.7 and not with 2.6.
To resolve this little problem lets edit the ebuild of scapy and put this:

# vim /usr/portage/net-analyzer/scapy/scapy-2.2.0-r1.ebuild

PYTHON_DEPEND="2:2.6"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.*"

and in pkg_setup() function comment this:

#       python_set_active_version 2

It is relative easy to do.

now generate new digest, because if you try compile, md5sum will be differ.

# ebuild /usr/portage/net-analyzer/scapy/scapy-2.2.0-r1.ebuild digest

now compile

# emerge scapy

now run W3AF

# python2.6 ./w3af_gui

 

 

This entry was posted in Information and tagged , , , . Bookmark the permalink.