gadgetinventor / pyrit

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

cpyrit_calpp fails to compile #147

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
cpyrit_calpp fails to compile

What is the expected output? What do you see instead?

output is in attached file

What version of the product are you using? On what operating system?
I have bt4 on Intel machine (i7 975)
with ATI 10.3 drivers and HD5970.Stream SDK 2.01 and CAL++ library
succesfully installed and
working.I'm using Pyrit 0.3.1-dev (svn r245)

Original issue reported on code.google.com by odl...@gmail.com on 15 Apr 2010 at 11:46

Attachments:

GoogleCodeExporter commented 8 years ago
please give information about gcc version. And version of CAL++ library.
( output of command gcc -v )

Original comment by hazema...@gmail.com on 15 Apr 2010 at 12:50

GoogleCodeExporter commented 8 years ago
Also please give version of boost library on your system and verify if it's 
installed
correctly.
It looks a little bit like boost::is_same is missing ( maybe some additional 
includes
are required ).

Original comment by hazema...@gmail.com on 15 Apr 2010 at 1:09

GoogleCodeExporter commented 8 years ago
root@bt:~# gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.2-1ubuntu12'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3
--program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug 
--enable-objc-gc
--enable-mpfr --enable-targets=all --enable-checking=release 
--build=i486-linux-gnu
--host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu12)

CAL++ library is calpp-0.86.3.tar.gz

and boost is from ubuntu packet manager (look to attached file)

Original comment by odl...@gmail.com on 15 Apr 2010 at 2:06

Attachments:

GoogleCodeExporter commented 8 years ago
I've solved...removed all libbost library from packet manager and reinstall 
from source
This is the benchmark
pyrit benchmark
Pyrit 0.3.1-dev (svn r247) (C) 2008-2010 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Running benchmark (77958.0 PMKs/s)... /

Computed 81288.19 PMKs/s total.
#1: 'CAL++ Device #1 'ATI CYPRESS'': 40546.6 PMKs/s (RTT 2.8)
#2: 'CAL++ Device #2 'ATI CYPRESS'': 39239.6 PMKs/s (RTT 2.7)
#3: 'CPU-Core (SSE2)': 457.6 PMKs/s (RTT 3.1)
#4: 'CPU-Core (SSE2)': 460.1 PMKs/s (RTT 3.0)
#5: 'CPU-Core (SSE2)': 463.7 PMKs/s (RTT 2.8)
#6: 'CPU-Core (SSE2)': 455.8 PMKs/s (RTT 2.9)
#7: 'CPU-Core (SSE2)': 470.4 PMKs/s (RTT 3.0)
#8: 'CPU-Core (SSE2)': 466.0 PMKs/s (RTT 3.1)

Original comment by odl...@gmail.com on 15 Apr 2010 at 5:03

GoogleCodeExporter commented 8 years ago
fixed. this is a stock 5970 ?

Original comment by lukas.l...@gmail.com on 15 Apr 2010 at 5:55

GoogleCodeExporter commented 8 years ago
SAPPHIRE  RADEON HD 5970 OverClock edition but currently use default value.
Any benefit if I switch to 64bit system?

Original comment by odl...@gmail.com on 15 Apr 2010 at 6:06

GoogleCodeExporter commented 8 years ago
Hard to say. What drivers version are you using ?
To tell you the truth on ati forum there was report 45 pmks/s on 5850.
And each core in 5970 should be slightly faster then 5850. Strange.
I have a hunch that the card is not feeded properly. 
You could try to change line 410 in pyrit/cpyrit/cpyrit.py from 'ncpus-=1' to
'ncpus-=2' ( or even 4 ). And please report the results :). 
If it will help then it's probably a "bug" in pyrit.

And the problem was with 1.34 version of boost library - it's quite old :).
There were some additional includes required. But I'll fix it anyway in CAL++ 
svn soon. 

Original comment by hazema...@gmail.com on 15 Apr 2010 at 6:44

GoogleCodeExporter commented 8 years ago
I really would like you to try change this line with ncpus. It most probably is 
a
problem in pyrit that needs to be addressed. On nathalem each core is reported 
as 2 (
with hyperthreading enabled ). And this leads to one real core serving 2 gpus. 
The
problem is also magnified by busy waiting in cal drivers. 
The effect could be that both gpus are starving and don't run on full speed.

Original comment by hazema...@gmail.com on 15 Apr 2010 at 7:24

GoogleCodeExporter commented 8 years ago
I use ati driver 10.3
change line 410 in /usr/lib/python2.5/site-packages/cpyrit/cpyrit.py from 
'ncpus-=1'
to ncpus-=2

pyrit benchmark
Pyrit 0.3.1-dev (svn r247) (C) 2008-2010 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Running benchmark (83321.4 PMKs/s)... -

Computed 89267.17 PMKs/s total.
#1: 'CAL++ Device #1 'ATI CYPRESS'': 45736.9 PMKs/s (RTT 2.7)
#2: 'CAL++ Device #2 'ATI CYPRESS'': 41201.6 PMKs/s (RTT 2.8)
#3: 'CPU-Core (SSE2)': 561.0 PMKs/s (RTT 2.9)
#4: 'CPU-Core (SSE2)': 624.2 PMKs/s (RTT 3.0)
#5: 'CPU-Core (SSE2)': 595.8 PMKs/s (RTT 2.9)
#6: 'CPU-Core (SSE2)': 536.2 PMKs/s (RTT 3.0)

change line 410 in /usr/lib/python2.5/site-packages/cpyrit/cpyrit.py from 
'ncpus-=2'
to ncpus-=4

pyrit benchmark
Pyrit 0.3.1-dev (svn r247) (C) 2008-2010 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Running benchmark (90389.9 PMKs/s)... /

Computed 93075.44 PMKs/s total.
#1: 'CAL++ Device #1 'ATI CYPRESS'': 47712.3 PMKs/s (RTT 2.8)
#2: 'CAL++ Device #2 'ATI CYPRESS'': 47148.3 PMKs/s (RTT 2.8)

no more CPU-Core ??

Original comment by odl...@gmail.com on 16 Apr 2010 at 7:24

GoogleCodeExporter commented 8 years ago
I would say typical trade-off. You give back 2800 pmk from cpus for 15000 pmk 
from
gpu. I think it's a good deal :). 
The whole problem is that ATI drivers are really cpu sensitive ( or cpu hogs :) 
).
I'm working on new method for feeding gpu. It's done and running, but it 
requires
more testing. The idea was to be less cpu sensitive and have 1% maybe 2% 
speedup from
gpu. The good thing is that cpu usage dropped. But the strange thing is that I 
have
9% speedup from gpu. I've tested it and everything looks ok, but because of the 
9% I
am not sure. After some cleanups I'll probably post it as issue here so people 
can
test it a little. And then Lukas will decide what to do with it.
Also CAL++ has experimental support for non blocking waiting for events. It's
disabled by default. To enable it you need to uncomment line 43 in cal.hpp ( or 
add
-D__CAL_USE_NON_BLOCKING_WAIT to gcc parameters ). It has it's own issues, but 
maybe
it will help a little bit.

Original comment by hazema...@gmail.com on 16 Apr 2010 at 9:23

GoogleCodeExporter commented 8 years ago
This after uncomment line 42 in /usr/local/include/cal/cal.hpp
#define __CAL_USE_NON_BLOCKING_WAIT 1
root@bt:~# pyrit benchmark
Pyrit 0.3.1-dev (svn r247) (C) 2008-2010 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Running benchmark (89656.3 PMKs/s)... /

Computed 94369.22 PMKs/s total.
#1: 'CAL++ Device #1 'ATI CYPRESS'': 47348.0 PMKs/s (RTT 2.8)
#2: 'CAL++ Device #2 'ATI CYPRESS'': 48230.1 PMKs/s (RTT 2.9)
root@bt:~# pyrit benchmark
Pyrit 0.3.1-dev (svn r247) (C) 2008-2010 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Running benchmark (90406.6 PMKs/s)... -

Computed 94281.00 PMKs/s total.
#1: 'CAL++ Device #1 'ATI CYPRESS'': 47893.6 PMKs/s (RTT 2.7)
#2: 'CAL++ Device #2 'ATI CYPRESS'': 46314.2 PMKs/s (RTT 2.8)

Original comment by odl...@gmail.com on 16 Apr 2010 at 10:11

GoogleCodeExporter commented 8 years ago
I'm trying to install cpyrit_calpp under Ubuntu 64bit but when

odlan@H3ll:~/Scaricati/pyrit/pyrit_svn/cpyrit_calpp$ sudo python setup.py 
install
unavailable enviroment variable ATISTREAMSDKROOT
Traceback (most recent call last):
  File "setup.py", line 32, in <module>
    CALPP_INC_DIR = os.environ['ATISTREAMSDKROOT']
  File "/usr/lib/python2.6/UserDict.py", line 22, in __getitem__
    raise KeyError(key)
KeyError: 'ATISTREAMSDKROOT'

odlan@H3ll:~/Scaricati/pyrit/pyrit_svn/cpyrit_calpp$ echo $ATISTREAMSDKROOT
/home/odlan/Scaricati/ati-stream-sdk-v2.01-lnx64/

odlan@H3ll:~$ python --version
Python 2.6.4

Original comment by odl...@gmail.com on 16 Apr 2010 at 2:25

GoogleCodeExporter commented 8 years ago
ATISTREAMSDKROOT must be pointing to directory with ATI's SDK..
As written in README and in ATI's SDK README :).
before building issue command
export ATISTREAMSDKROOT=directory with sdk

Original comment by hazema...@gmail.com on 16 Apr 2010 at 2:32

GoogleCodeExporter commented 8 years ago
Sudo removes some enviroment variables. So
sudo bash
export ATISTREAMSDKROOT=...
python setup.py install

Original comment by hazema...@gmail.com on 16 Apr 2010 at 2:36

GoogleCodeExporter commented 8 years ago
Thank you.Now fixed
pyrit benchmark
Pyrit 0.3.1-dev (C) 2008-2010 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Running benchmark (95467.3 PMKs/s)... - 

Computed 100756.52 PMKs/s total.
#1: 'CAL++ Device #1 'ATI CYPRESS'': 49512.9 PMKs/s (RTT 2.8)
#2: 'CAL++ Device #2 'ATI CYPRESS'': 49408.2 PMKs/s (RTT 2.7)

no substantial improvement on 64bit system

Original comment by odl...@gmail.com on 16 Apr 2010 at 5:48

GoogleCodeExporter commented 8 years ago
Odlan3 could you test v2 core. I'm really interested how it will work for you.
( look at the issue 148 )

Original comment by hazema...@gmail.com on 17 Apr 2010 at 7:30

GoogleCodeExporter commented 8 years ago
I will try and tell you the results

Original comment by odl...@gmail.com on 17 Apr 2010 at 8:18

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I' can't compile cpyrit_calpp
odlan@H3ll:~/Scaricati/pyritV2/cpyrit_calpp$ python setup.py build
svn: '.' non è una copia locale
running build
running build_ext
Building modules...
building 'cpyrit._cpyrit_calpp' extension
creating build
creating build/temp.linux-x86_64-2.6
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes
-fPIC -I/home/odlan/Scaricati/ati-stream-sdk-v2.01-lnx64/include
-I/usr/include/python2.6 -c _cpyrit_calpp.cpp -o
build/temp.linux-x86_64-2.6/_cpyrit_calpp.o -DVERSION="0.3.1-dev"
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for 
Ada/C/ObjC
but not for C++
_cpyrit_calpp.cpp: In function ‘void start_kernel(CALDevice*, int)’:
_cpyrit_calpp.cpp:248: error: ‘class cal::CommandQueue’ has no member named 
‘isEventDone’
_cpyrit_calpp.cpp: In function ‘void send_pmklist(CALDevice*, gpu_inbuffer*, 
int)’:
_cpyrit_calpp.cpp:263: error: ‘CAL_RESALLOC_REMOTE’ was not declared in 
this scope
_cpyrit_calpp.cpp:264: error: ‘CAL_RESALLOC_REMOTE’ was not declared in 
this scope
_cpyrit_calpp.cpp: In function ‘PyObject* cpyrit_receive(CALDevice*, 
PyObject*)’:
_cpyrit_calpp.cpp:396: error: ‘class cal::CommandQueue’ has no member named 
‘isEventDone’
_cpyrit_calpp.cpp:399: warning: comparison between signed and unsigned integer
expressions
error: command 'gcc' failed with exit status 1

Original comment by odl...@gmail.com on 17 Apr 2010 at 11:34

GoogleCodeExporter commented 8 years ago
You need to install svn version of CAL++ library ( look at the issue 148 ). This
error is explained there. 

Original comment by hazema...@gmail.com on 17 Apr 2010 at 11:47

GoogleCodeExporter commented 8 years ago
Hello sorry to revive this could you go over the inclusion of the 
ati-stream-sdk part...

unavailable enviroment variable ATISTREAMSDKROOT
Traceback (most recent call last):
  File "setup.py", line 35, in <module>
    CALPP_INC_DIR = os.environ['ATISTREAMSDKROOT']
  File "/usr/lib/python2.6/UserDict.py", line 22, in __getitem__
    raise KeyError(key)
KeyError: 'ATISTREAMSDKROOT'

ls

build                  _cpyrit_calpp.cpp         
_cpyrit_calpp_kernel_generator.cpp  README
convert_optimized.sed  _cpyrit_calpp.h           generate_optimized_kernel      
     setup.py
COPYING                _cpyrit_calpp_kernel.cpp  MANIFEST.in

echo $ATISTREAMSDKROOT

/ati-stream-sdk-v2.2-lnx32

python --version

Python 2.6.6

I am going mad trying to get this to work! What commands do i need to use!

Original comment by Keylogge...@gmail.com on 26 Jan 2011 at 12:44

GoogleCodeExporter commented 8 years ago
For environment variable to be visible in executed programs you must use export 
keyword. So you need to type
export ATISTREAMSDKROOT=/directory_with_sdk

Original comment by hazema...@gmail.com on 26 Jan 2011 at 11:26

GoogleCodeExporter commented 8 years ago
Issue 240 has been merged into this issue.

Original comment by lukas.l...@gmail.com on 26 Jan 2011 at 12:05

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
middle@The-Beast:~/Desktop/pyrit_svn/cpyrit_calpp$ echo $ATISTREAMSDKROOT
/ati-stream-sdk-v2.2-lnx32
middle@The-Beast:~/Desktop/pyrit_svn/cpyrit_calpp$ export 
ATISTREAMSDKROOT=/ati-stream-sdk-v2.2-lnx32
middle@The-Beast:~/Desktop/pyrit_svn/cpyrit_calpp$ sudo ./setup.py build
unavailable enviroment variable ATISTREAMSDKROOT
Traceback (most recent call last):
  File "./setup.py", line 35, in <module>
    CALPP_INC_DIR = os.environ['ATISTREAMSDKROOT']
  File "/usr/lib/python2.6/UserDict.py", line 22, in __getitem__
    raise KeyError(key)
KeyError: 'ATISTREAMSDKROOT'
middle@The-Beast:~/Desktop/pyrit_svn/cpyrit_calpp$ 

Am i missing something?

Original comment by Keylogge...@gmail.com on 26 Jan 2011 at 2:07

GoogleCodeExporter commented 8 years ago
You can use command 
set 
to see what environment variables are defined.
Or just to check if ATISTREAMSDKROOT is avaiable use
set | grep ATISTREAMSDKROOT

I don't know how to help you. Problem is that setup doesn't see this 
environment variable. If it's defined maybe there is some problem with your 
python installation ( try to reinstall python ).

Original comment by hazema...@gmail.com on 26 Jan 2011 at 3:42

GoogleCodeExporter commented 8 years ago
You may also simply replace the line

CALPP_INC_DIR = os.environ['ATISTREAMSDKROOT']

in setup.py with

CALPP_INC_DIR = '/ati-stream-sdk-v2.2-lnx32'

(while '/ati-stream-sdk-v2.2-lnx32' should in fact be the fully qualified path)

Original comment by lukas.l...@gmail.com on 26 Jan 2011 at 5:29

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
please do not post such links.

if you need further help, please post on the mailing list as this bug is closed.

Original comment by lukas.l...@gmail.com on 26 Jan 2011 at 11:03

GoogleCodeExporter commented 8 years ago
middle@The-Beast:~/Desktop/pyrit_svn/cpyrit_calpp$ echo $ATISTREAMSDKROOT
/ati-stream-sdk-v2.2-lnx32
middle@The-Beast:~/Desktop/pyrit_svn/cpyrit_calpp$ export 
ATISTREAMSDKROOT=/ati-stream-sdk-v2.2-lnx32
middle@The-Beast:~/Desktop/pyrit_svn/cpyrit_calpp$ sudo ./setup.py build
unavailable enviroment variable ATISTREAMSDKROOT
Traceback (most recent call last):
  File "./setup.py", line 35, in <module>
    CALPP_INC_DIR = os.environ['ATISTREAMSDKROOT']
  File "/usr/lib/python2.6/UserDict.py", line 22, in __getitem__
    raise KeyError(key)
KeyError: 'ATISTREAMSDKROOT'
middle@The-Beast:~/Desktop/pyrit_svn/cpyrit_calpp$ 

Am i missing something?

I had the same troubles using ubuntu 10 10. It was because the version of 
libboost was old. Grab a copy of boost 1.46 and you should be golden ;)

Original comment by zarrens...@gmail.com on 13 Apr 2011 at 8:36

GoogleCodeExporter commented 8 years ago
I think this issue could be partially related to #173.
odl.., can you do not olny a benckmark but also a real test on a list.txt of 
(i.e.) 500 Million of passwords and report the real PMK/s?

Please, do 

time pyrit -e test -r wpa.cap -i list.txt attack_passthrough

and report result.

Original comment by pyrit.lo...@gmail.com on 13 Apr 2011 at 10:47