bollustrado / pyrit

Automatically exported from code.google.com/p/pyrit
0 stars 1 forks source link

Error Message after installing cpyrit-cuda-0.4.0 #446

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.I installed nvidia-driver with this descripcion: 
http://docs.kali.org/general-use/install-nvidia-drivers-on-kali-linux
2. I got a few problems, but now it works (see information below)
3. First i couldn't install cpyrit because he didn't find lcuda, so i tried 
diferent links in the system, aparently today i could install it, but i get 
this error now when i'd like to start pyrit.

What is the expected output? What do you see instead?
when i'd like to open pyrit i get this error message:
root@kalirocks:~# pyrit -help
Traceback (most recent call last):
  File "/usr/local/bin/pyrit", line 6, in <module>
    pyrit_cli.Pyrit_CLI().initFromArgv()
  File "/usr/local/lib/python2.7/dist-packages/pyrit_cli.py", line 61, in initFromArgv
    args, commands = getopt.getopt(sys.argv[1:], 'u:v:c:e:i:o:r:b:')
  File "/usr/lib/python2.7/getopt.py", line 90, in getopt
    opts, args = do_shorts(opts, args[0][1:], shortopts, args[1:])
  File "/usr/lib/python2.7/getopt.py", line 190, in do_shorts
    if short_has_arg(opt, shortopts):
  File "/usr/lib/python2.7/getopt.py", line 206, in short_has_arg
    raise GetoptError('option -%s not recognized' % opt, opt)
getopt.GetoptError: option -h not recognized

What version of the product are you using? On what operating system?
I have a Lenovo T430, Intel Core i7-3520M, NVS 5400M and use Debian GNU/Linux 
Kali Linux 1.0.6

Please provide any additional information below.
Here are some other outputs of my system:
root@kalirocks:~# /usr/local/cuda-5.5/open64/bin/nvopencc -v
NVIDIA (R) CUDA Open64 Compiler
Cuda compilation tools, release 5.5, V5.5.0
Built on 2013-07-17
Open64 Compiler Suite: Version 4.1
Built on: 2013-07-17
Thread model: posix
GNU gcc version 3.4.5 (Open64 4.2 driver)

root@kalirocks:~# lspci -v | perl -ne '/VGA/../^$/ and /VGA|Kern/ and print' 
01:00.0 VGA compatible controller: NVIDIA Corporation GF108 [Quadro NVS 5400M] 
(rev a1) (prog-if 00 [VGA controller])
    Kernel driver in use: nvidia

root@kalirocks:~/pyrit-0.3.0# pyrit list_cores
WARNING: Unknown option 'limit_ncpus' in configfile '/root/.pyrit/config'
WARNING: Unknown option 'workunit_size' in configfile '/root/.pyrit/config'
Pyrit 0.3.0 (C) 2008-2010 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

The following cores seem available...
#1:  'CPU-Core (SSE2)'
#2:  'CPU-Core (SSE2)'
#3:  'CPU-Core (SSE2)'
#4:  'CPU-Core (SSE2)'

.bashrc:
PATH=$PATH:/usr/local/cuda-5.5/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-5.5/lib
export PATH
export LD_LIBRARY_PATH
export PATH=/usr/local/cuda/bin:$PATH
export LPATH=/usr/lib/nvidia/current:$LPATH
export LIBRARY_PATH=/usr/lib/nvidia/current:$LIBRARY_PATH
export 
LD_LIBRARY_PATH=/usr/lib/nvidia/current:/usr/local/cuda/lib64:/usr/local/cuda/li
b:$LD_LIBRARY_PATH

Thanks a lot for all kind of help.

Original issue reported on code.google.com by Benjya...@googlemail.com on 7 Mar 2014 at 5:13

GoogleCodeExporter commented 9 years ago
I forgot that pyrit -help doesn't exist... 
so my problem is that pyrit doesn't find my GPU:
root@kalirocks:~/hs# pyrit list_cores
WARNING: Unknown option 'limit_ncpus' in configfile '/root/.pyrit/config'
WARNING: Unknown option 'workunit_size' in configfile '/root/.pyrit/config'
Pyrit 0.3.0 (C) 2008-2010 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

The following cores seem available...
#1:  'CPU-Core (SSE2)'
#2:  'CPU-Core (SSE2)'
#3:  'CPU-Core (SSE2)'
#4:  'CPU-Core (SSE2)'

if anybody has an idea how i can solve this - i really appreciate it.

Original comment by Benjya...@googlemail.com on 7 Mar 2014 at 5:17

GoogleCodeExporter commented 9 years ago
do this:
1) don't use the development driver - it moans about the 3.2.6 kernel - just go 
to nvidia drivers and get the latest linux build for your card (you can 
download from website & don't have to use wget). Download it to the suggested 
location for ease later.

I used NVIDIA-Linux-x86-295.20.run because thats my card.

2) go to developer.nvidia.com and get the CUDA Toolkit 4.1

http://developer.nvidia.com/cuda-toolkit-41

I selected the Ubuntu 10.04 32 bit option

3) open a shell and prepare kernel sources (thanks Softize):

prepare-kernel-sources
cd /usr/src/linux
cp -rf include/generated/* include/linux/

4) purge any existing nvidia drivers:

hit ctrl+alt+f1 to stop xserver

apt-get --purge remove xserver-xorg-video-nouveau

(remember to remove any existing drivers using the ./ --uninstall if you are 
updating)

5) mine would not let me install the new driver because it was moaning about 
nouveau

so, blacklist in Grub (thanks TonyIta)

nano /etc/default/grub

"...vga=791 nouveau.modeset=0"

exit and save then

update-grub

reboot

chmod +x "your-nvidia-driver".run
./your-nvidia-driver

should now install fine.

chmod +x cudatoolkit_4.1.28_linux_32_ubuntu10.04.run
./cudatoolkit_4.1.28_linux_32_ubuntu10.04.run

(leave the default path when asked)

once finished:

nano ~/.bashrc

change the PATH= and add these lines to the end (after the last fi) so it looks 
like this:

PATH=$PATH:/usr/local/cuda/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64
export PATH
export LD_LIBRARY_PATH

exit nano and save changes.

source /root/.bashrc
ldconfig

Then follow Chee Yang's how to from this point on - ie:

Check NVIDIA compiler:

root@bt:~# which nvcc
/usr/local/cuda/bin/nvcc
root@bt:~# nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2011 NVIDIA Corporation
Built on Thu_May_12_11:09:45_PDT_2011
Cuda compilation tools, release 4.0, V0.2.1221

Setup pyrit

Setup pyrit dependent packages:

root@bt:~# apt-get install libssl-dev
root@bt:~# apt-get install scapy
root@bt:~# apt-get install python-dev

Check out Pyrit SVN trunk:

root@bt:~# svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit

Build Pyrit:

root@bt:~# cd pyrit/pyrit/
root@bt:~/pyrit/pyrit# python setup.py build
root@bt:~/pyrit/pyrit# python setup.py install

Test Pyrit:

root@bt:~/pyrit/pyrit# pyrit list_cores
Pyrit 0.4.1-dev (svn r308) (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: 'CPU-Core (SSE2)'
#2: 'CPU-Core (SSE2)'
#3: 'CPU-Core (SSE2)'
#4: 'CPU-Core (SSE2)'
#5: 'CPU-Core (SSE2)'
#6: 'CPU-Core (SSE2)'

#7: 'CPU-Core (SSE2)'
#8: 'CPU-Core (SSE2)'

Setup CUDA for Pyrit

Build CUDA for Pyrit:

root@bt:~/pyrit/pyrit# cd ../cpyrit_cuda/
root@bt:~/pyrit/cpyrit_cuda# python setup.py build
root@bt:~/pyrit/cpyrit_cuda# python setup.py install

Test CUDA for Pyrit:

root@bt:~/pyrit/cpyrit_cuda# pyrit list_cores
Pyrit 0.4.1-dev (svn r308) (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: 'CUDA-Device #1 'GeForce 8400 GS''
#2: 'CPU-Core (SSE2)'
#3: 'CPU-Core (SSE2)'
#4: 'CPU-Core (SSE2)'
#5: 'CPU-Core (SSE2)'
#6: 'CPU-Core (SSE2)'
#7: 'CPU-Core (SSE2)'
#8: 'CPU-Core (SSE2)'

root@bt:~/pyrit/cpyrit_cuda# pyrit benchmark
Pyrit 0.4.1-dev (svn r308) (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Running benchmark (3240.1 PMKs/s)... \

Computed 3240.14 PMKs/s total.
#1: 'CUDA-Device #1 'GeForce 8400 GS'': 457.5 PMKs/s (RTT 3.2)
#2: 'CPU-Core (SSE2)': 425.5 PMKs/s (RTT 3.0)
#3: 'CPU-Core (SSE2)': 425.9 PMKs/s (RTT 3.0)
#4: 'CPU-Core (SSE2)': 426.2 PMKs/s (RTT 3.0)
#5: 'CPU-Core (SSE2)': 425.5 PMKs/s (RTT 2.9)
#6: 'CPU-Core (SSE2)': 425.6 PMKs/s (RTT 3.1)
#7: 'CPU-Core (SSE2)': 453.3 PMKs/s (RTT 3.0)
#8: 'CPU-Core (SSE2)': 422.3 PMKs/s (RTT 3.1)

Thats it!

(My GTX260 is showing around 9,300)

Many thanks to Chee Yang!

Hope this helps somebody.

Original comment by deltomaf...@gmail.com on 23 Mar 2014 at 12:08