byt3bl33d3r / CrackMapExec

A swiss army knife for pentesting networks
BSD 2-Clause "Simplified" License
8.45k stars 1.64k forks source link

error AttributeError: 'Namespace' #375

Closed frenyman closed 4 years ago

frenyman commented 4 years ago

hi, when trying to perform a credential list check with the SSH protocol the following error appears, I have tried with the new version and the version pre-installed in kali 2018.1 but it is not working it shows the following error:


Traceback (most recent call last):
  File "src/gevent/greenlet.py", line 854, in gevent._greenlet.Greenlet.run
  File "/usr/local/lib/python3.8/dist-packages/crackmapexec-5.0.2.dev0-py3.8.egg/cme/connection.py", line 47, in __init__
    self.proto_flow()
  File "/usr/local/lib/python3.8/dist-packages/crackmapexec-5.0.2.dev0-py3.8.egg/cme/connection.py", line 82, in proto_flow
    self.login()
  File "/usr/local/lib/python3.8/dist-packages/crackmapexec-5.0.2.dev0-py3.8.egg/cme/connection.py", line 184, in login
    if self.args.hash:
AttributeError: 'Namespace' object has no attribute 'hash'
2020-05-06T06:08:55Z <Greenlet at 0xb3173688: ssh(Namespace(aesKey=False, cred_id=[], darrell=False,, <protocol.database object at 0xb311d850>, '10.10.10.187')> failed with AttributeError
mpgn commented 4 years ago

Should be fixed in branch v5-dev, good issue ! :)

arty-hlr commented 4 years ago

Getting the same issue on version 5.0.2dev installed from apt:

Traceback (most recent call last):
  File "src/gevent/greenlet.py", line 766, in gevent._greenlet.Greenlet.run
  File "/usr/lib/python3/dist-packages/cme/connection.py", line 47, in __init__
    self.proto_flow()
  File "/usr/lib/python3/dist-packages/cme/connection.py", line 82, in proto_flow
    self.login()
  File "/usr/lib/python3/dist-packages/cme/connection.py", line 184, in login
    if self.args.hash:
AttributeError: 'Namespace' object has no attribute 'hash'
2020-10-30T14:02:17Z <Greenlet at 0x7fd764476e10: ssh(Namespace(aesKey=False, cred_id=[], darrell=False,, <protocol.database object at 0x7fd7643a09d0>, TARGET)> failed with AttributeError
mpgn commented 4 years ago

Use latest version https://app.gitbook.com/@mpgn/s/crackmapexec-cme/getting-started/installation

arty-hlr commented 4 years ago

I did, pip had it, somehow apt wasn't up to date. Thanks for the pointer though!