freewso / pyrit

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

Fix for error in network.py #391

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1.vi /usr/local/lib/python2.6/dist-packages/cpyrit/network.py

2. Find the following lines :

except socket.error:
   break
if essid != '' or pwbuffer != '':
   pwlist = storage.PAW2_Buffer()
   pwlist.unpack(pwbuffer.data)
   self.client.enqueue(essid, pwlist)
else:
   time.sleep(1)

Change it to :

except socket.error:
   break
if essid != '' or pwbuffer != '':
   pwlist = storage.PAW2_Buffer(pwbuffer.data)
   self.client.enqueue(essid, pwlist)
else:
   time.sleep(1)

----------------------------------------------------------------------------

Output of server before fix when a client connects to server to benchmark or 
batch process.

root@bt:~# pyrit serve
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+

Serving 1 active clients; 0 PMKs/s; 0.0 TTS Exception in thread Thread-12:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.6/dist-packages/cpyrit/network.py", line 54, in run
    pwlist = storage.PAW2_Buffer()
TypeError: __init__() takes exactly 2 arguments (1 given)

Serving 1 active clients; 0 PMKs/s; 0.0 TTS Exception in thread Thread-14:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.6/dist-packages/cpyrit/network.py", line 54, in run
    pwlist = storage.PAW2_Buffer()
TypeError: __init__() takes exactly 2 arguments (1 given)

----------------------------------------------------------------------------

What version of the product are you using? On what operating system?

BT 5 R2 64bit KDE (Pyrit Server) & MySQL

Please provide any additional information below.

Still does not stop the server from crashing if 'pyrit list_cores' is run.

all other commands are without error! 

Where is the author!

Original issue reported on code.google.com by overchec...@gmail.com on 11 Mar 2012 at 10:41

GoogleCodeExporter commented 8 years ago
I think Lukas was abducted by some cocksucking government agency, has been no 
sign of any progress on this project since April 2011. Hopefully someone with 
talent will pick up where Lukas left off and clean up all the horrible bugs in 
this code.

Original comment by Testicul...@gmail.com on 3 Aug 2012 at 12:05

GoogleCodeExporter commented 8 years ago
Fixed it for ya!

Apply this patch with:

patch -p0 < pyrit_paw2bufferfix.patch

inside pyrit_svn branch. In one place cpyrit.py uses PAW2_Buffer constructor 
instead of .pack() method.

Tested it on ubuntu 13.04 and fixes the issue with pyrit serve. The error is on 
the running machine side, not on the serving one.

Original comment by kichadal...@gmail.com on 8 May 2013 at 6:54

Attachments: