jessytheguru / pyrit

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

pyrit serve problem #159

Open GoogleCodeExporter opened 8 years ago

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

What is the expected output? What do you see instead?
I run pyrit serve and see:

root@michapc:~# pyrit serve
Pyrit 0.3.1-dev (svn r254) (C) 2008-2010 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Serving 0 active clients; 0 PMKs/s; 0.0 TTS 

so far its ok, when i list_cores on the client it shows:

Pyrit 0.3.1-dev (svn r254) (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:  'Network-Clients'

When i try to compute stuff or selftest i get this error msg(always server
side/client is working without the network device):

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

Serving 0 active clients; 0 PMKs/s; 0.0 TTS 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 110, in
initFromArgv
    func(self, **options)
  File "/usr/local/lib/python2.6/dist-packages/pyrit_cli.py", line 676, in
serve
    server.addClient(addr)
  File "/usr/local/lib/python2.6/dist-packages/cpyrit/network.py", line
139, in addClient
    if self.cp.ncore_uuid is not None:
AttributeError: 'CPyrit' object has no attribute 'ncore_uuid'

i really wonder what i did wrong, would be very kind if some of u guys
could give me a hint.
Both the server and client work well in "solo" mode.

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

I tried from Ubuntu 10.4 to Ubuntu 10.4
from Backtrack4final to Ubuntu 10.4
from Backtrack4fin to Backtrack4fin
im using the latest svn r254.
i always get the same error msg.

Please provide any additional information below.
keep up the great work guys!

i hope my bad english wont make ur eyes bleed.

Original issue reported on code.google.com by michiz...@web.de on 12 May 2010 at 1:37

GoogleCodeExporter commented 8 years ago
I can't say for the BT4>BT4 attempt, but I believe Ubuntu 10.04 installs with 
default 
app-armor and ufw rules that could be blocking you. You might double check that 
those 
are not causing any issues.

Just to cover our bases here, you are adding the proper machines under known 
clients in 
the config file......right?

Original comment by ryan...@gmail.com on 13 May 2010 at 7:51

GoogleCodeExporter commented 8 years ago
thanks for your reply.
yes sorry i forgot to say that i first opened the port 17935 with iptables, but 
i
wasnt sure that it worked properly so i disabled the ufw on all tested systems.
IP is double and tripple checked should be right. config looks like:

default_storage = file://
rpc_announce = true
rpc_announce_broadcast = false
rpc_knownclients = 192.168.1.9
rpc_server = true
workunit_size = 75000

could it be that this is some kind of nvidia card/cuda issue?
because when i switch positions so that the pc with cuda is the client,
and i start pyrit serve on my laptop (with aticard but without opencl,will try 
it
with opencl later)it works :

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

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

Computed 6980.73 PMKs/s total.
#1: 'CUDA-Device #1 'GeForce 9800 GT'': 5620.0 PMKs/s (RTT 2.8)
#2: 'CPU-Core (SSE2)': 216.7 PMKs/s (RTT 3.0)
#3: 'Network-Clients': 808.5 PMKs/s (RTT 5.9)

this was via wifi, ill test wired later, but somehow its crazy that it works 
this way.
is it possible to switch the cuda device off without uninstalling?
so i could try if it works when just the cpu cores are in use.greets

Original comment by michiz...@web.de on 17 May 2010 at 8:39

GoogleCodeExporter commented 8 years ago
ok, this is crazy, after reinstalling ati-driver/ati-sdk/pyrit/opencl 
on the laptop which was the client, it works without errors for the server.
problem solved.
sorry for taking your time.

Original comment by michiz...@web.de on 17 May 2010 at 11:24

GoogleCodeExporter commented 8 years ago
I found "rpc_server = true" has to be set on machines running as "pyrit serve". 
I also found it has to be set on the main machine, if you want to use the 
network.

Original comment by starhe...@gmail.com on 24 Jul 2010 at 7:08

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
In case anyone wonders why "pyrit serve" doesn't work in trunk, nor in the 
0.4.0 release, here's a fix:

Index: pyrit/cpyrit/network.py
===================================================================
--- pyrit/cpyrit/network.py (revision 308)
+++ pyrit/cpyrit/network.py (working copy)
@@ -51,8 +51,7 @@
                 except socket.error:
                     break
                 if essid != '' or pwbuffer != '':
-                    pwlist = storage.PAW2_Buffer()
-                    pwlist.unpack(pwbuffer.data)
+                    pwlist = storage.PAW2_Buffer(pwbuffer.data)
                     self.client.enqueue(essid, pwlist)
                 else:
                     time.sleep(1)

I guess it was forgotten to fix this code while refactoring PAW2_Buffer.
This setup now works:
#1) machine 'server', running 'pyrit serve', using the default .pyrit/config 
file (unchanged).
#2) machine 'client', running eg. 'pyrit benchmark', with a .pyrit/config file 
that says rpc_server=true, and rpc_knownclients = yourserver

WARNING: Running 'pyrit list_cores' on the client, will cause the server to 
lockup at the moment, at least with Python 2.6 on Mac OS 10.6. Run 'pyrit 
benchmark' instead and see how work is distributed properly. It seems to work, 
but list_cores definately cause lockups like:

Serving 0 active clients; 0 PMKs/s; 0.0 TTS Traceback (most recent call last):
  File "/usr/local/bin/pyrit", line 6, in <module>
    pyrit_cli.Pyrit_CLI().initFromArgv()
  File "/Library/Python/2.6/site-packages/pyrit_cli.py", line 117, in initFromArgv
    func(self, **options)
  File "/Library/Python/2.6/site-packages/pyrit_cli.py", line 881, in serve
    server.addClient(addr)
  File "/Library/Python/2.6/site-packages/cpyrit/network.py", line 139, in addClient
    client = NetworkClient(srv_addr, self.enqueue, known_uuids)
  File "/Library/Python/2.6/site-packages/cpyrit/network.py", line 67, in __init__
    self.srv_uuid, self.uuid = self.server.register(";".join(known_uuids))
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1237, in request
    errcode, errmsg, headers = h.getreply()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 1024, in getreply
    response = self._conn.getresponse()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 950, in getresponse
    response.begin()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 390, in begin
    version, status, reason = self._read_status()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 348, in _read_status
    line = self.fp.readline()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.py", line 395, in readline
    data = recv(1)
socket.error: [Errno 54] Connection reset by peer

A naive interpretation is that its trying to read responses from the client, 
which has already did, due list_cores natures. Not sure about that though.

Is the project still active? I'll also build it on windows today, let's see.

Original comment by nikolas....@gmail.com on 17 Nov 2011 at 9:08

GoogleCodeExporter commented 8 years ago
Building on windows works just fine now without SSE2 support though, just a 
side-note.

Original comment by nikolas....@gmail.com on 17 Nov 2011 at 1:25

GoogleCodeExporter commented 8 years ago
Derp almost 1 1/2 years later and still, pyrit serve not fixed.

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

GoogleCodeExporter commented 8 years ago
root@galileo:/home/devadmin# 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 0 active clients; 0 PMKs/s; 0.0 TTS 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 117, in initFromArgv
    func(self, **options)
  File "/usr/local/lib/python2.6/dist-packages/pyrit_cli.py", line 881, in serve
    server.addClient(addr)
  File "/usr/local/lib/python2.6/dist-packages/cpyrit/network.py", line 140, in addClient
    client = NetworkClient(srv_addr, self.enqueue, known_uuids)
  File "/usr/local/lib/python2.6/dist-packages/cpyrit/network.py", line 68, in __init__
    self.srv_uuid, self.uuid = self.server.register(";".join(known_uuids))
  File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.6/xmlrpclib.py", line 1237, in request
    errcode, errmsg, headers = h.getreply()
  File "/usr/lib/python2.6/httplib.py", line 1064, in getreply
    response = self._conn.getresponse()
  File "/usr/lib/python2.6/httplib.py", line 990, in getresponse
    response.begin()
  File "/usr/lib/python2.6/httplib.py", line 391, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.6/httplib.py", line 349, in _read_status
    line = self.fp.readline()
  File "/usr/lib/python2.6/socket.py", line 427, in readline
    data = recv(1)
socket.error: [Errno 104] Connection reset by peer

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

GoogleCodeExporter commented 8 years ago
Fixed it for ya (fixes the issue with PAW2_Buffer which might be related)

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:44

Attachments: