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:
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 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), OpenSSL (e.g. openssl-devel or libssl-dev) 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 Download area. The more adventurous among you may instead want to try the latest source-code in Pyrit's repository. The code in svn-trunk 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.
Download the source-code package for Pyrit and (optionally) a extension-module.
Now unpack the source-code into a new directory like this:
tar xvzf pyrit-0.3.0.tar.gz tar xvzf cpyrit-cuda-0.3.0.tar.gz
Continue with the compiling as explained below.
You need to install a subversion-client before you can use Pyrit's source-code repository; most Linux distributions provide a package for that. Do the initial checkout from svn-trunk like this:
svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit_svn
This will create a new directory 'pyrit_svn' that holds all of Pyrit's latest source-code. Execute svn update
inside that directory to keep track of changes.
Switch to the main module's directory which should be 'Pyrit-0.2.4' (if you used a source-code package) or 'pyrit_svn/pyrit' (if you're on svn). We use Python's distutils to compile and install the code:
cd pyrit-0.3.0 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.
Get yourself a copy of the CUDA-Toolkit from http://www.nvidia.com/object/cuda_get.html. You need to modify either $PATH and ldconfig or setup.py if you choose not to install the Toolkit into either '/usr/local/cuda' or '/opt/cuda' so CPyrit-CUDA's installation routine can find Nvidia's compiler 'nvcc'. You also need to have Nvidia's proprietary hardware-drivers installed in the way that fits your OS.
Switch to the directory holding CPyrit-CUDA's source-code and compile and install it just like you did with Pyrit:
cd cpyrit-cuda-0.3.0 python setup.py build sudo python setup.py install
Executing 'pyrit list_cores' should list your GPUs. Please see the troubleshooting-wiki if it doesn't work.
OpenCL is currently supported by Nvidia (GeForce GPUs), AMD (ATI Radeon GPUs and SSE3-capable CPUs) and IBM (CELL B.E. CPUs). You can get a copy of the SDKs that are required to build CPyrit-OpenCL from the following sites (registration required):
Please see the drivers' installation instruction for how to get everything up and running. The SDKs usually include simple demos and examples. First try to get those demos working and you'll most probably have no problems installing CPyrit-OpenCL.
Switch to the directory holding CPyrit-OpenCL's source-code and compile and install it just like you did with Pyrit:
cd cpyrit-opencl-0.3.0 python setup.py build sudo python setup.py install
Executing 'pyrit list_cores' should list your GPUs. Please see the troubleshooting-wiki if it doesn't work
Binary packages are not directly supported. The Pentoo- and the Backtrack4-LiveCD include Pyrit as pre-build packages.
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: lukas.l...@gmail.com
Use the newsgroup for support/questions.
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: nbertha...@gmail.com
scapy 2.x should probably also be listed as an optional requirement for installation.
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: lukas.l...@gmail.com
The cuda-libraries are usually not reachable to the linker by default. Either symlink libcuda.so from where it is installed (e.g. /usr/lib{64}/nvidia/) to /usr/lib{64} or modify the library search path.
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: lukas.l...@gmail.com
Be sure to install python's and openssl's headers (e.g. from the -dev or -devel package of your distribution)
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: JeanDami...@gmail.com
On a basic ubuntu system :
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: Kangar...@gmail.com
sudo apt-get install python-scapy and then it works with command mentioned in tutorial wiki page
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: KD5...@gmail.com
-lcuda was a problem for me too. I'll submit a patch.
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: k...@rhynn.net
building on opensuse is pain ._. _
at first it falled with "cpyrit/_cpyrit_cpu.c:32:20: fatal error: Python.h: Нет такого файла или каталога" ("no such file or dir"). _
okay, added devel/languages/python/factory repo(coz default repo has not python-devel), updated everything python-related, and runned "python setup.py build" again.
then it falled with "/usr/include/python2.6/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG"".
okay, vim /usr/include/python2.6/pyconfig.h, add string "#define PY_FORMAT_LONG_LONG" and run "python setup.py build" again.
then it died with "/usr/lib/gcc/i586-suse-linux/4.5/../../../../i586-suse-linux/bin/ld: cannot find - python2.6".
and then, at last:
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: k...@rhynn.net
building cpyrit-cuda gave a warning: "nvcc warning : option 'host-compilation' has been deprecated and is ignored" but everything else was ok.
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: mrfantas...@aol.com
shouldnt it be python26 setup.py build ? yum install python26
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: abc1234...@gmail.com
NVIDIA GPUDirect
http://developer.nvidia.com/gpudirect
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: abc1234...@gmail.com
sudo apt-get install g++ python-dev python-scapy libssl-dev libpcap-dev zlib1g-dev
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: cheyenne...@hotmail.co.uk
i dont have a clue wot to do
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: vpr...@local-motors.com
Windows is perfect for you!
<blockquote>Im not a super oober tech nerd and I don't have a bachelors degree in computer programming so this is pointless, this is why they came out with windows in the first place... </blockquote>
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: akitt...@googlemail.com
ok i have installed pyrit following the instructions above but the tutorial i'm following as the command -- ( pyrit -f essid import_passwords) but looking at the man page for pyrit there is no -f option and it's throwing out this
getopt.GetoptError?: option -f not recognized
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: akitt...@googlemail.com
ok i think i've sussed it by using the -i stdin command -- (pyrit - essid import_passwords).
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: singh.jo...@gmail.com
hi guys
after one week work my system is up and running pyrit here is some output
root@ubuntu:~# pyrit list_cores Pyrit 0.4.0 (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com This code is distributed under the GNU General Public License v3+
The following cores seem available... #1: 'OpenCL-Device 'Cypress'' #2: 'OpenCL-Device 'Cypress'' #3: 'CPU-Core (SSE2)' #4: 'CPU-Core (SSE2)' root@ubuntu:~# pyrit benchmark Pyrit 0.4.0 (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com This code is distributed under the GNU General Public License v3+
Running benchmark (82534.1 PMKs/s)... /
Computed 82534.09 PMKs/s total. #1: 'OpenCL-Device 'Cypress'': 44162.9 PMKs/s (RTT 2.9) #2: 'OpenCL-Device 'Cypress'': 44378.7 PMKs/s (RTT 2.8) #3: 'CPU-Core (SSE2)': 734.2 PMKs/s (RTT 3.0) #4: 'CPU-Core (SSE2)': 727.3 PMKs/s (RTT 3.0)
i have 2 ati hd5870 i think is good what do you think
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: Elektrok...@gmail.com
hey singh.jo can you help me in setting up cal+?xD.i cant do it it always fails and some errors pop up
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: cwjowls...@btinternet.com
running build
running build_py
copying pyrit_cli.py -> build/lib.linux-i686-2.5
copying cpyrit/init.py -> build/lib.linux-i686-2.5/cpyrit
copying cpyrit/cpyrit.py -> build/lib.linux-i686-2.5/cpyrit
copying cpyrit/util.py -> build/lib.linux-i686-2.5/cpyrit
copying cpyrit/pckttools.py -> build/lib.linux-i686-2.5/cpyrit
copying cpyrit/config.py -> build/lib.linux-i686-2.5/cpyrit
copying cpyrit/network.py -> build/lib.linux-i686-2.5/cpyrit
copying cpyrit/network.py -> build/lib.linux-i686-2.5/cpyrit
copying cpyrit/storage.py -> build/lib.linux-i686-2.5/cpyrit
copying cpyrit/init.py -> build/lib.linux-i686-2.5/cpyrit
copying cpyrit/pckttools.py -> build/lib.linux-i686-2.5/cpyrit
copying cpyrit/config.py -> build/lib.linux-i686-2.5/cpyrit
copying cpyrit/util.py -> build/lib.linux-i686-2.5/cpyrit
copying cpyrit/cpyrit.py -> build/lib.linux-i686-2.5/cpyrit
running build_ext
building 'cpyrit._cpyrit_cpu' extension _
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.5 -c cpyrit/_cpyrit_cpu.c -o build/temp.linux-i686-2.5/cpyrit/_cpyrit_cpu.o -Wall -fno-strict-aliasing -DVERSION="0.4.0"
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.5 -c cpyrit/_cpyrit_cpu_sse2.S -o build/temp.linux-i686-2.5/cpyrit/_cpyrit_cpu_sse2.o -Wall -fno-strict-aliasing -DVERSION="0.4.0"
gcc -pthread -shared build/temp.linux-i686-2.5/cpyrit/_cpyrit_cpu.o build/temp.linux-i686-2.5/cpyrit/_cpyrit_cpu_sse2.o -lcrypto -lpcap -o build/lib.linux-i686-2.5/cpyrit/_cpyrit_cpu.so _
/usr/bin/ld: cannot find -lcrypto
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
cant understand why I'm getting this error when I have the openssl and libpcap installed, any help or advice?
Thanks in advance
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: cwjowls...@btinternet.com
ah; I finaly got it working I have to force openssl & libpcap to compile and install. looking forward to fully testing this out.
system: knoppix Live CD with persistant disk I had to install openssl-0.9.8r, libpcap-1.1.1, zlib-1.2.5, python-2.5.6 and scapy-latest plus pyrit-0.4.0
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: anand.va...@mobme.in
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: cwjowls...@btinternet.com
it seem to have a problem working on VIA padlock, but works great on other machines. also works great with a program called "crunch" e.g
crunch 8 8 ABCDEF1234567890 | pyrit -r mydump -i- attack_passthrough
one thing the next version could do with is been able to handle dump files that have been stopped half way through a packet makeing the dump truckated.. saves having to use wireshark to drop the last packet.
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: lombok...@gmail.com
thank's to developer teams, for this greats job. working like charm on my fedora16_x64. compile from svn.
regard.
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: dhamahar...@gmail.com
@cwjowls, I'm having the same problem as you. Take a look at SO for details >> http://stackoverflow.com/questions/11663513/changing-ld-library-path-for-pyrit-install What I'm asking is, how did you get the third gcc to see the libpcap local directory? Thank you.
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: cwjowls...@btinternet.com
I'll take a look once at home and repost the solution