Installation

Prerequisites

Make sure you have the following software ready before starting the installation:

  • Git client: sudo apt-get install git

  • Python 3.11, which is installed by default in most systems

  • Pip version 23.x: sudo apt-get install python3-pip

  • node-js

  • Optional: If you want python3 to launch when typing python: sudo apt-get install python-is-python

Installation

git clone https://github.com/w4af/w4af.git
cd w4af/
python -m pip install --upgrade pipenv wheel
pipenv install
npm install
pipenv shell
./w4af_console

Let me explain what’s going on there:

  • First we use git to download w4af’s source code

  • Then we install pipenv and wheel

  • Dependencies are installed by running pipenv install and npm install

  • virtual environment is started with pipenv shell

The framework dependencies don’t change too often, but don’t be alarmed if after updating your installation w4af requires you to install new dependencies via the above commands

Supported platforms

The framework should work on all Python supported platforms.

Note

The platform used for development is Ubuntu 22.04 and running our continuous integration tests is Ubuntu 22.04 LTS.

Warning

While in theory you can install w4af in Microsoft Windows or Mac OS, we don’t recommend nor support that installation process.

Installing using Docker

Docker is awesome, it allows users to run w4af without installing any of it’s dependencies. The only pre-requisite is to install docker , which is widely supported.

Once the docker installation is running these steps will yield a running w4af console:

docker run -it w4af/w4af:latest

For advanced usage of w4af’s docker container please see Readme in subfolder extras/docker of the w4af-repo.

Troubleshooting

After running the helper script w4af still says I have missing python dependencies, what should I do?

You will recognize this when this message appears: “Your python installation needs the following modules to run w4af”.

First you’ll want to check that all the dependencies are installed. To do that just follow these steps:

$ cd w4af
$ ./w4af_console
...
Your python installation needs the following modules to run w4af:
futures
...
$ pip freeze | grep futures
futures==2.1.5
$

Replace futures with the library that is missing in your system. If the pip freeze | grep futures command returns an empty result, you’ll need to install the dependency using the /tmp/w4af_dependency_install.sh command. Pay special attention to the output of that command, if installation fails you won’t be able to run w4af.

How do I ask for support on installation issues?

You can create a ticket containing the following information:

  • Your linux distribution (usually the contents of /etc/lsb-release will be enough)

  • The output of pip freeze

  • The output of python --version