How to install pyrit in parrots

How to install pyrit in parrots

Simple, from apt:

sudo apt update && sudo apt install pyrit -y

pyrit was removed from server because of python2 removal.

Are you trying to install Linset? Try this:

first of all make sure you have:

*openssl (apt install libssl-dev),
*apt install python
*apt install python3-dev
*apd install zlib1g
*apt install zlib1g-dev
*apt install libcap-dev

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, we use Python’s distutils to compile and install the code:

sudo pip install psycopg2             ##default, install to use SQL database access.
sudo pip install scapy                ##default, scapy is required for analize/attack functionality.
**NOTE:**
sudo apt-get install python-scapy     ##If above command didn't work, in debian systems you can try this.


cd Pyrit                 ## Compile 
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

no working


  • List item
    ┌─[root@parrot]─[~/Pyrit]
    └──╌ #python setup.py build
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    copying pyrit_cli.py -> build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/init.py -> build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/cpyrit.py -> build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/util.py -> build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/pckttools.py -> build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/config.py -> build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/network.py -> build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/storage.py -> build/lib.linux-x86_64-2.7/cpyrit
    running build_ext
    building ‘cpyrit._cpyrit_cpu’ extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/cpyrit
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-uC7NI8/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c cpyrit/_cpyrit_cpu.c -o build/temp.linux-x86_64-2.7/cpyrit/_cpyrit_cpu.o -Wall -fno-strict-aliasing -DVERSION=“0.5.1” -maes -mpclmul
    cpyrit/_cpyrit_cpu.c:32:10: fatal error: Python.h: No such file or directory
    32 | #include <Python.h>
    | ^~~~~~~~~~
    compilation terminated.
    Failed to build; Compiling without AES-NI
    building ‘cpyrit._cpyrit_cpu’ extension
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-uC7NI8/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c cpyrit/_cpyrit_cpu.c -o build/temp.linux-x86_64-2.7/cpyrit/_cpyrit_cpu.o -Wall -fno-strict-aliasing -DVERSION=“0.5.1”
    cpyrit/_cpyrit_cpu.c:32:10: fatal error: Python.h: No such file or directory
    32 | #include <Python.h>
    | ^~~~~~~~~~
    compilation terminated.
    error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1
    ┌─[✗]─[root@parrot]─[~/Pyrit]
    └──╌ #python setup.py install
    running install
    running build
    running build_py
    running build_ext
    building ‘cpyrit._cpyrit_cpu’ extension
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-uC7NI8/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c cpyrit/_cpyrit_cpu.c -o build/temp.linux-x86_64-2.7/cpyrit/_cpyrit_cpu.o -Wall -fno-strict-aliasing -DVERSION=“0.5.1” -maes -mpclmul
    cpyrit/_cpyrit_cpu.c:32:10: fatal error: Python.h: No such file or directory
    32 | #include <Python.h>
    | ^~~~~~~~~~
    compilation terminated.
    Failed to build; Compiling without AES-NI
    building ‘cpyrit._cpyrit_cpu’ extension
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-uC7NI8/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c cpyrit/_cpyrit_cpu.c -o build/temp.linux-x86_64-2.7/cpyrit/_cpyrit_cpu.o -Wall -fno-strict-aliasing -DVERSION=“0.5.1”
    cpyrit/_cpyrit_cpu.c:32:10: fatal error: Python.h: No such file or directory
    32 | #include <Python.h>
    | ^~~~~~~~~~
    compilation terminated.
    error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1

  • List item

I tried Wifite last night for the first time and saw it was complaining about missing Pyrit.

I was able to get Pyrit installed, or at least Wifite isn’t complaining about it missing. See screenshot, I don’t know what I’m doing, but I’m attacking my own router.

I had to manually install Python2’s pip.

sudo python2 ./get-pip.py

Make sure the libpython2-dev package is installed in Parrot.

sudo apt install libpython2-dev

Then you install the relevant Python2 packages (cython might not be needed).

sudo python2 -m pip install cython scapy psycopg2-binary

The rest is as the Pyrit GitHub page says

git clone https://github.com/JPaulMora/Pyrit.git
cd Pyrit
python2 setup.py build

And if built successfully, run

sudo python2 setup.py install

I “think” it’s working.

i don’t suggest install any of python2 because of python2 EOL

Understood. Too bad some tools haven’t been ported from 2 to 3 (yet). I imagine professionals use hashcat or something else against the WPA handshake capture file.

My nice Alfa AWUS036NH appears to be malfunctioning, so I bought a cheap Panda Wireless PAU06 for $13 (USD) this morning, which is supposed to support monitor mode and packet injection.

Well yeah. I meant hashcat is much faster than other software. The problem is hardware. But hashcat stills support use normal CPU brute as far as i remember. Flag --force.
Anyhow i played with the “bruteforce hash” script before and well the benchmark of py script and software like John, Hashcat is a huge difference. And that was just cpu only.
For wifite(2), it uses not only pyrit but aircrack-ng to crack wpa so well, why should we focus on Pyrit. Aircrack-ng should cover all.

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.