JPaulMora / Pyrit

The famous WPA precomputed cracker, Migrated from Google.
GNU General Public License v3.0
1.06k stars 273 forks source link

Unable to run pyrit_0.3.0 On Non SSE2 cpus - Patch needed #250

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Unable to run Pyrit on Non SSE2 Cpus

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

Pyrit should autodetect whether the cpu has SSE2 or MMX, it does not, tested on 
multiple coppermine cpu bases sytems as well as Multi Proc Katmai XEON servers.

What version of the product are you using? On what operating system?
Pyrit-0.3.0 on Ubuntu Server Karmic 9.10  

Please provide any additional information below.

root@poweredge:~/pyrit-0.3.0/cpyrit# pyrit selftest
Pyrit 0.3.0 (C) 2008-2010 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Cores incorporated in the test:
#1:  'CPU-Core (SSE2)'
#2:  'CPU-Core (SSE2)'
#3:  'CPU-Core (SSE2)'
#4:  'CPU-Core (SSE2)'
#5:  'Network-Clients'

Running selftest...
Exception in thread CPU-Core (SSE2):
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.6/dist-packages/cpyrit/cpyrit.py", line 111, in run
    self._testComputeFunction(101)
  File "/usr/local/lib/python2.6/dist-packages/cpyrit/cpyrit.py", line 101, in _testComputeFunction
    raise ValueError("Test-vector does not result in correct PMK.")
ValueError: Test-vector does not result in correct PMK.

Exception in thread CPU-Core (SSE2):
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.6/dist-packages/cpyrit/cpyrit.py", line 108, in run
    essid, pwlist = self.queue._gather(self.buffersize, timeout=0.5)
  File "/usr/local/lib/python2.6/dist-packages/cpyrit/cpyrit.py", line 552, in _gather
    self._check_cores()
  File "/usr/local/lib/python2.6/dist-packages/cpyrit/cpyrit.py", line 410, in _check_cores
    raise SystemError("The core '%s' has died unexpectedly" % core)
SystemError: The core 'CPU-Core (SSE2)' has died unexpectedly

Exception in thread CPU-Core (SSE2):
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.6/dist-packages/cpyrit/cpyrit.py", line 108, in run
    essid, pwlist = self.queue._gather(self.buffersize, timeout=0.5)
  File "/usr/local/lib/python2.6/dist-packages/cpyrit/cpyrit.py", line 552, in _gather
    self._check_cores()
  File "/usr/local/lib/python2.6/dist-packages/cpyrit/cpyrit.py", line 410, in _check_cores
    raise SystemError("The core '%s' has died unexpectedly" % core)
SystemError: The core 'CPU-Core (SSE2)' has died unexpectedly

Exception in thread CPU-Core (SSE2):
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.6/dist-packages/cpyrit/cpyrit.py", line 108, in run
    essid, pwlist = self.queue._gather(self.buffersize, timeout=0.5)
  File "/usr/local/lib/python2.6/dist-packages/cpyrit/cpyrit.py", line 552, in _gather
    self._check_cores()
  File "/usr/local/lib/python2.6/dist-packages/cpyrit/cpyrit.py", line 410, in _check_cores
    raise SystemError("The core '%s' has died unexpectedly" % core)
SystemError: The core 'CPU-Core (SSE2)' has died unexpectedly

Traceback (most recent call last):
  File "/usr/local/bin/pyrit", line 6, in <module>
    pyrit_cli.Pyrit_CLI().initFromArgv()
  File "/usr/local/lib/python2.6/dist-packages/pyrit_cli.py", line 106, in initFromArgv
    func(self, **options)
  File "/usr/local/lib/python2.6/dist-packages/pyrit_cli.py", line 854, in selftest
    cp.enqueue(essid, pws)
  File "/usr/local/lib/python2.6/dist-packages/cpyrit/cpyrit.py", line 484, in enqueue
    self._check_cores()
  File "/usr/local/lib/python2.6/dist-packages/cpyrit/cpyrit.py", line 410, in _check_cores
    raise SystemError("The core '%s' has died unexpectedly" % core)
SystemError: The core 'CPU-Core (SSE2)' has died unexpectedly

Original issue reported on code.google.com by thefixe...@gmail.com on 1 Feb 2011 at 8:14

GoogleCodeExporter commented 9 years ago
 2.6.31-14-generic-pae #48-Ubuntu SMP Fri Oct 16 15:22:42 UTC 2009 i686 GNU/Linux

Original comment by thefixe...@gmail.com on 1 Feb 2011 at 8:14

GoogleCodeExporter commented 9 years ago
There is a small bug in 0.3.0 that makes Pyrit use the SSE2 core even if only 
MMX is available. Such configuration is only present on some older CPUs, 
therefor the bug went undetected for quite some time. It was fixed in 0.4.0-dev 
r271 and is fixed in Debian's and Ubuntu's packages of 0.3.0

Can you check /proc/cpuinfo if you processor does support MMX but not SSE2 - 
the latest version from svn should work for you in this case.

Original comment by lukas.l...@gmail.com on 2 Feb 2011 at 7:39

GoogleCodeExporter commented 9 years ago
yes I have the latest svn of 0.4.0 now and the issue is gone, lol, now I know 
why no one noticed. see below for the reason, lol

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

Computed 103.30 PMKs/s total.
#1: 'CPU-Core (x86)': 32.8 PMKs/s (RTT 8.0)
#2: 'CPU-Core (x86)': 33.9 PMKs/s (RTT 4.5)
#3: 'CPU-Core (x86)': 33.0 PMKs/s (RTT 7.5)
#4: 'CPU-Core (x86)': 33.3 PMKs/s (RTT 5.1)

Original comment by thefixe...@gmail.com on 2 Feb 2011 at 10:44

GoogleCodeExporter commented 9 years ago
root@PowerEdge6300:~# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 7
model name      : Pentium III (Katmai)
stepping        : 3
cpu MHz         : 549.995
cache size      : 1024 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov 
pse36 mmx fxsr sse
bogomips        : 1099.99
clflush size    : 32
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 7
model name      : Pentium III (Katmai)
stepping        : 3
cpu MHz         : 549.995
cache size      : 1024 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov 
pse36 mmx fxsr sse
bogomips        : 1100.09
clflush size    : 32
power management:

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 6
model           : 7
model name      : Pentium III (Katmai)
stepping        : 3
cpu MHz         : 549.995
cache size      : 1024 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov 
pse36 mmx fxsr sse
bogomips        : 1100.09
clflush size    : 32
power management:

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 7
model name      : Pentium III (Katmai)
stepping        : 3
cpu MHz         : 549.995
cache size      : 1024 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov 
pse36 mmx fxsr sse
bogomips        : 1100.09
clflush size    : 32
power management:

Original comment by thefixe...@gmail.com on 3 Feb 2011 at 3:54

GoogleCodeExporter commented 9 years ago

Original comment by lukas.l...@gmail.com on 3 Feb 2011 at 7:51