Skip to content
John Mora edited this page Jun 10, 2016 · 26 revisions

Introduction

This document will guide you through the installation of Pyrit and it's modules.

Pyrit compiles and runs on Linux, FreeBSD and MacOS. Windows is not (and probably never will be) supported; there are however some reports of successful installations on Windows with the help of MinGW.

Pyrit consists of basically two parts:

  • The main module features the commandline-client, the scheduling- and database-code and a basic extension-module that uses the CPU for computation. The main module is required for everyone...
  • There are currently two extension modules that add support for more advanced hardware. The extension modules for Nvidia-CUDA and OpenCL may be installed optionally and are used if available and supported by local hardware.

You can choose between OpenCL and CUDA if you have a compatible Nvidia-GPU; you may want to take a look at this page to find out if your hardware supports Nvidia-CUDA. People with GPUs from ATI are supported through AMD's OpenCL-implementation and may find this page of interest; other possible OpenCL-platforms like IBM's Cell B.E. (that powers the Playstation 3) should work but are untested at the moment.

Compiling from sources (Releases or Git)

General Dependencies

Compiling from source-code is the preferred way of getting Pyrit onto your system. Linux users running a binary distribution may need to install the development packages for Python e.g. python-devel (CentOS/Fedora) or python-dev (Ubuntu/Debian) OpenSSL e.g. openssl-devel or libssl-dev (you get which one) and Zlib (e.g. zlib-devel). You also need a C-compiler like gcc. Users of MacOS probably only need to have XCode installed.

From time to time Pyrit get's packed into (hopefully) stable packages. In general you should download, compile and install these source-code packages from the Latest Release.

The more adventurous among you may instead want to try the latest source-code in Pyrit's repository. The code in The Main page may include more features and provide better performance but also may cause random problems or even not compile at all. Use the fixed packages when in doubt.

Stable: Source-code from fixed packages

Download the source-code package for Pyrit, it includes the (optional) extension modules.

  • Pyrit (required): Latest Version
  • CPyrit-CUDA (optional, for Nvidia-hardware)
  • CPyrit-OpenCL (optional, for compatible hardware) Now unpack the source-code into a new directory like this:
unzip Pyrit-vX.zip
cd Pyrit-X

You may use an archive manager for easier unpacking.

Assuming you have successfully installed dependencies listed above, continue with the compiling as explained below.

Adventurous: Source-code from git

You need to install git before you can use Pyrit's repository; most Linux distributions provide a package for that. Do the initial clone from git like this:

git clone https://github.com/JPaulMora/Pyrit.git

This will create a new directory called 'Pyrit' that holds all of Pyrit's latest source-code. Execute git pull inside that directory to keep track of changes, you may need to recompile for changes to take effect.

Compiling and installing

... the main module

Switch to the main module's directory. We need to install some python dependencies first, for which we will use the pip command (you can use anaconda too), we use Python's distutils to compile and install the code:

sudo pip install psycopg2             ##default, install to use SQL database access.
conda install psycopg2                ##only if you have anaconda python installed.

sudo pip install scapy                ##default, scapy is required for analize/attack functionality.
sudo apt-get install python-scapy     ##If above command didn't work, in debian systems you can try this.

conda install --channel https://conda.anaconda.org/pdrops scapy ##Again, only if you use anaconda.

cd Pyrit                 ## Compile time!
python setup.py clean
python setup.py build

If everything went well and no errors are thrown at you, use distutils again to install Pyrit:

sudo python setup.py install

You can now execute pyrit from your commandline; leave the source-code's directory before doing so to prevent Python from getting confused with module-lookups by executing cd.

For instructions on how to install CUDA or OpenCL add-ons please refer to this wiki page on the subject.

Using binary packages

Binary packages are not directly supported and don't provide the GPU acceleration modules, but provide an easy way of getting Pyrit into your system. The Pentoo-, Kali Linux 1/2 include Pyrit as pre-built packages, finally Ubuntu 14.04 LTS lets you apt-get install pyrit.