allfro / pymetasploit

A full-fledged msfrpc library for Metasploit framework.
298 stars 141 forks source link

AttributeError: can't set attribute #27

Open gnu-like opened 5 years ago

gnu-like commented 5 years ago
>>> exploit = client.modules.use('exploit', 'multi/handler')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/metasploit/msfrpc.py", line 1660, in use
    Mandatory Arguments:
  File "/usr/local/lib/python2.7/dist-packages/metasploit/msfrpc.py", line 1485, in __init__
    Mandatory Arguments:
  File "/usr/local/lib/python2.7/dist-packages/metasploit/msfrpc.py", line 1326, in __init__
    "runoptions"]
AttributeError: can't set attribute
>>> exploit = client.modules.use('exploit', 'multi/handler')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/metasploit/msfrpc.py", line 1660, in use
    return ExploitModule(self.rpc, mname)
  File "/usr/local/lib/python2.7/dist-packages/metasploit/msfrpc.py", line 1485, in __init__
    super(ExploitModule, self).__init__(rpc, 'exploit', exploit)
  File "/usr/local/lib/python2.7/dist-packages/metasploit/msfrpc.py", line 1326, in __init__
    setattr(self, k, self._info.get(k))
AttributeError: can't set attribute

there is:

>>> print client.modules.exploits[329]
multi/handler
shobhitmittal commented 5 years ago

https://github.com/Mikaayenson/pymetasploit/commit/e493c36ebae079e55aad343346a55b6240c56fb2

The above link solves the issue.