Skip to main content

Python RPC client for Metasploit Framework

Project description

snek-sploit

Python typed RPC client for Metasploit Framework.

from snek_sploit import Client

if __name__ == '__main__':
    client = Client("msf", "root")
    print(client.core.rpc.version())

Installation

pip install snek-sploit

Starting MSF RPC server

In console

load msgrpc ServerHost=127.0.0.1 ServerPort=55553 User=msf Pass='root' SSL=true

In the background

msfrpcd -U msf -P root

More information can be found in the MSF official documentation.

Using the MSF's certificate

Certificate is by default taken from /root/.msf4/msf-ws-cert.pem (use the -c flag to choose a different location). If it's not, generate it as mentioned here.

Running MSF with RPC using Docker Compose

Make sure you've installed Docker Compose.

In case you don't want to set up MSF RPC on your own, here is a convenient Compose config with MSF RPC and database:

docker compose up -d

Link to the MSF image documentation.

TODO list

  • Typing and parameter support for the DB RPC class
  • async vs sync version?
  • Add custom exceptions
  • Wrapper classes for easier workflows (session, console, etc.)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snek_sploit-0.2.0.tar.gz (20.0 kB view hashes)

Uploaded Source

Built Distribution

snek_sploit-0.2.0-py3-none-any.whl (28.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page