# threat9/routersploit architecture

> Architecture diagram of the GitHub repository threat9/routersploit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/threat9/routersploit
- Repository: https://github.com/threat9/routersploit

## Overview

RouterSploit is an interactive embedded-device penetration-testing framework. An operator selects and configures a module in the interpreter, then runs vulnerability checks, credential tests, scanners, or exploits against a target; results are reported through the framework’s output layer. The module catalog also includes payload generators, encoders, and generic attacks. The graph shows the documented capabilities and sampled runtime relationships; many individual modules and protocol implementations were not inspected, so their specific call paths are omitted.

Main entry points: [`routersploit/interpreter.py`](https://github.com/threat9/routersploit/blob/master/routersploit/interpreter.py) (Interactive interpreter), [`routersploit/core/exploit/exploit.py`](https://github.com/threat9/routersploit/blob/master/routersploit/core/exploit/exploit.py) (Exploit framework), [`routersploit/modules/exploits`](https://github.com/threat9/routersploit/tree/master/routersploit/modules/exploits) (Device exploits), [`routersploit/core/exploit/option.py`](https://github.com/threat9/routersploit/blob/master/routersploit/core/exploit/option.py) (Options and validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Operator interface"]
  node_interpreter["Interactive interpreter<br/>[interpreter.py]"]
end

subgraph group_catalog["Security modules"]
  node_exploits["Device exploits"]
  node_credentials["Credential checks"]
  node_scanners["Vulnerability scanners"]
  node_payloads["Payload modules"]
  node_generic["Generic attacks"]
  node_encoders["Encoders"]
end

subgraph group_runtime["Framework runtime"]
  node_exploitbase["Exploit framework<br/>[exploit.py]"]
  node_options["Options and validation<br/>[option.py]"]
  node_payloadcore["Payload generation<br/>[payloads.py]"]
  node_shell["Interactive shell helper<br/>[shell.py]"]
  node_utils["Module discovery utilities<br/>[utils.py]"]
  node_printer["Output and reporting<br/>[printer.py]"]
end

subgraph group_protocols["Protocol clients"]
  node_http["HTTP client<br/>[http_client.py]"]
  node_ssh["SSH client<br/>[ssh_client.py]"]
  node_ftp["FTP client<br/>[ftp_client.py]"]
  node_telnet["Telnet client<br/>[telnet_client.py]"]
  node_snmp["SNMP client<br/>[snmp_client.py]"]
  node_tcp["TCP client<br/>[tcp_client.py]"]
  node_udp["UDP client<br/>[udp_client.py]"]
  node_bluetooth["Bluetooth clients<br/>[btle_client.py]"]
end

node_operator(("Operator"))
node_target(("Embedded device"))

node_operator -->|"commands"| node_interpreter
node_interpreter -->|"discovers modules"| node_utils
node_interpreter -->|"accesses payloads"| node_payloadcore
node_interpreter -->|"loads exploits"| node_exploitbase
node_exploits -->|"uses HTTP"| node_http
node_exploits -->|"uses SSH"| node_ssh
node_generic -->|"uses UDP"| node_udp
node_scanners -->|"checks exploits"| node_exploitbase
node_scanners -->|"selects modules"| node_exploits
node_credentials -.->|"uses options"| node_options
node_payloads -.->|"generates payloads"| node_payloadcore
node_encoders -.->|"encodes payloads"| node_payloadcore
node_exploitbase -->|"aggregates options"| node_options
node_options -->|"reports errors"| node_printer
node_exploitbase -->|"reports status"| node_printer
node_interpreter -->|"prints output"| node_printer
node_interpreter -->|"runs shell helper"| node_shell
node_http -->|"sends requests"| node_target
node_ssh -->|"opens SSH"| node_target
node_ftp -.->|"connects FTP"| node_target
node_telnet -->|"connects Telnet"| node_target
node_snmp -.->|"queries SNMP"| node_target
node_tcp -->|"sends TCP"| node_target
node_udp -->|"sends UDP"| node_target
node_bluetooth -.->|"scans Bluetooth"| node_target

click node_interpreter "https://github.com/threat9/routersploit/blob/master/routersploit/interpreter.py"
click node_exploits "https://github.com/threat9/routersploit/tree/master/routersploit/modules/exploits"
click node_credentials "https://github.com/threat9/routersploit/tree/master/routersploit/modules/creds"
click node_scanners "https://github.com/threat9/routersploit/tree/master/routersploit/modules/scanners"
click node_payloads "https://github.com/threat9/routersploit/tree/master/routersploit/modules/payloads"
click node_generic "https://github.com/threat9/routersploit/tree/master/routersploit/modules/generic"
click node_encoders "https://github.com/threat9/routersploit/tree/master/routersploit/modules/encoders"
click node_exploitbase "https://github.com/threat9/routersploit/blob/master/routersploit/core/exploit/exploit.py"
click node_options "https://github.com/threat9/routersploit/blob/master/routersploit/core/exploit/option.py"
click node_payloadcore "https://github.com/threat9/routersploit/blob/master/routersploit/core/exploit/payloads.py"
click node_shell "https://github.com/threat9/routersploit/blob/master/routersploit/core/exploit/shell.py"
click node_utils "https://github.com/threat9/routersploit/blob/master/routersploit/core/exploit/utils.py"
click node_printer "https://github.com/threat9/routersploit/blob/master/routersploit/core/exploit/printer.py"
click node_http "https://github.com/threat9/routersploit/blob/master/routersploit/core/http/http_client.py"
click node_ssh "https://github.com/threat9/routersploit/blob/master/routersploit/core/ssh/ssh_client.py"
click node_ftp "https://github.com/threat9/routersploit/blob/master/routersploit/core/ftp/ftp_client.py"
click node_telnet "https://github.com/threat9/routersploit/blob/master/routersploit/core/telnet/telnet_client.py"
click node_snmp "https://github.com/threat9/routersploit/blob/master/routersploit/core/snmp/snmp_client.py"
click node_tcp "https://github.com/threat9/routersploit/blob/master/routersploit/core/tcp/tcp_client.py"
click node_udp "https://github.com/threat9/routersploit/blob/master/routersploit/core/udp/udp_client.py"
click node_bluetooth "https://github.com/threat9/routersploit/blob/master/routersploit/core/bluetooth/btle_client.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_interpreter toneBlue
class node_exploits,node_credentials,node_scanners,node_payloads,node_generic,node_encoders toneAmber
class node_exploitbase,node_options,node_payloadcore,node_shell,node_utils,node_printer toneMint
class node_http,node_ssh,node_ftp,node_telnet,node_snmp,node_tcp,node_udp,node_bluetooth toneRose
class node_operator,node_target toneIndigo
```

## Components

### Operator interface

- [Interactive interpreter](https://github.com/threat9/routersploit/blob/master/routersploit/interpreter.py): `routersploit/interpreter.py`

### Security modules

- [Device exploits](https://github.com/threat9/routersploit/tree/master/routersploit/modules/exploits): `routersploit/modules/exploits`
- [Credential checks](https://github.com/threat9/routersploit/tree/master/routersploit/modules/creds): `routersploit/modules/creds`
- [Vulnerability scanners](https://github.com/threat9/routersploit/tree/master/routersploit/modules/scanners): `routersploit/modules/scanners`
- [Payload modules](https://github.com/threat9/routersploit/tree/master/routersploit/modules/payloads): `routersploit/modules/payloads`
- [Generic attacks](https://github.com/threat9/routersploit/tree/master/routersploit/modules/generic): `routersploit/modules/generic`
- [Encoders](https://github.com/threat9/routersploit/tree/master/routersploit/modules/encoders): `routersploit/modules/encoders`

### Framework runtime

- [Exploit framework](https://github.com/threat9/routersploit/blob/master/routersploit/core/exploit/exploit.py): `routersploit/core/exploit/exploit.py`
- [Options and validation](https://github.com/threat9/routersploit/blob/master/routersploit/core/exploit/option.py): `routersploit/core/exploit/option.py`
- [Payload generation](https://github.com/threat9/routersploit/blob/master/routersploit/core/exploit/payloads.py): `routersploit/core/exploit/payloads.py`
- [Interactive shell helper](https://github.com/threat9/routersploit/blob/master/routersploit/core/exploit/shell.py): `routersploit/core/exploit/shell.py`
- [Module discovery utilities](https://github.com/threat9/routersploit/blob/master/routersploit/core/exploit/utils.py): `routersploit/core/exploit/utils.py`
- [Output and reporting](https://github.com/threat9/routersploit/blob/master/routersploit/core/exploit/printer.py): `routersploit/core/exploit/printer.py`

### Protocol clients

- [HTTP client](https://github.com/threat9/routersploit/blob/master/routersploit/core/http/http_client.py): `routersploit/core/http/http_client.py`
- [SSH client](https://github.com/threat9/routersploit/blob/master/routersploit/core/ssh/ssh_client.py): `routersploit/core/ssh/ssh_client.py`
- [FTP client](https://github.com/threat9/routersploit/blob/master/routersploit/core/ftp/ftp_client.py): `routersploit/core/ftp/ftp_client.py`
- [Telnet client](https://github.com/threat9/routersploit/blob/master/routersploit/core/telnet/telnet_client.py): `routersploit/core/telnet/telnet_client.py`
- [SNMP client](https://github.com/threat9/routersploit/blob/master/routersploit/core/snmp/snmp_client.py): `routersploit/core/snmp/snmp_client.py`
- [TCP client](https://github.com/threat9/routersploit/blob/master/routersploit/core/tcp/tcp_client.py): `routersploit/core/tcp/tcp_client.py`
- [UDP client](https://github.com/threat9/routersploit/blob/master/routersploit/core/udp/udp_client.py): `routersploit/core/udp/udp_client.py`
- [Bluetooth clients](https://github.com/threat9/routersploit/blob/master/routersploit/core/bluetooth/btle_client.py): `routersploit/core/bluetooth/btle_client.py`

### Other components

- **Operator**
- **Embedded device**

## Connections

- Operator → Interactive interpreter: commands
- Interactive interpreter → Module discovery utilities: discovers modules (evidence: `routersploit/interpreter.py`)
- Interactive interpreter → Payload generation: accesses payloads (evidence: `routersploit/interpreter.py`)
- Interactive interpreter → Exploit framework: loads exploits (evidence: `routersploit/interpreter.py`)
- Device exploits → HTTP client: uses HTTP (evidence: `routersploit/modules/exploits/routers/cisco/ucs_manager_rce.py`)
- Device exploits → SSH client: uses SSH (evidence: `routersploit/modules/exploits/routers/mikrotik/routeros_jailbreak.py`)
- Generic attacks → UDP client: uses UDP (evidence: `routersploit/modules/generic/upnp/ssdp_msearch.py`)
- Vulnerability scanners → Exploit framework: checks exploits (evidence: `routersploit/modules/scanners/autopwn.py`)
- Vulnerability scanners → Device exploits: selects modules (evidence: `routersploit/modules/scanners/autopwn.py`)
- Credential checks → Options and validation: uses options
- Payload modules → Payload generation: generates payloads
- Encoders → Payload generation: encodes payloads
- Exploit framework → Options and validation: aggregates options (evidence: `routersploit/core/exploit/exploit.py`)
- Options and validation → Output and reporting: reports errors (evidence: `routersploit/core/exploit/option.py`)
- Exploit framework → Output and reporting: reports status (evidence: `routersploit/core/exploit/exploit.py`)
- Interactive interpreter → Output and reporting: prints output (evidence: `routersploit/interpreter.py`)
- Interactive interpreter → Interactive shell helper: runs shell helper (evidence: `routersploit/interpreter.py`)
- HTTP client → Embedded device: sends requests (evidence: `routersploit/core/http/http_client.py`)
- SSH client → Embedded device: opens SSH (evidence: `routersploit/core/ssh/ssh_client.py`)
- FTP client → Embedded device: connects FTP
- Telnet client → Embedded device: connects Telnet (evidence: `routersploit/core/telnet/telnet_client.py`)
- SNMP client → Embedded device: queries SNMP
- TCP client → Embedded device: sends TCP (evidence: `routersploit/core/tcp/tcp_client.py`)
- UDP client → Embedded device: sends UDP (evidence: `routersploit/core/udp/udp_client.py`)
- Bluetooth clients → Embedded device: scans Bluetooth
