commands.sh

msfconsole

all

Console for the Metasploit Framework. Note: Run `sudo msfdb init` to enable the Metasploit database backend prior to launching `msfconsole`.

More info →

Options (2)

-x, --execute-commandboolean

Execute console commands (Note: Use `;` for passing multiple commands)

Example: sudo msfconsole {{[-x|--execute-command]}} "{{use auxiliary/scanner/portscan/tcp; set PORTS 80,443; set RHOSTS example.com; run; quit}}"
-r, --resourceboolean

Run a specific resource file

Example: sudo msfconsole {{[-r|--resource]}} {{path/to/file.rc}}

Examples (8)

Launch the interactive console (append `--quiet` to suppress the startup banner)

Execute console commands (Note: Use `;` for passing multiple commands)

sudo msfconsole [-x|--execute-command] "use auxiliary/scanner/portscan/tcp; set PORTS 80,443; set RHOSTS example.com; run; quit"

Run a specific resource file

sudo msfconsole [-r|--resource] path/to/file.rc

[Interactive] Show specific type of modules

show auxiliary|encoders|evasion|exploits|nops|payloads|post

[Interactive] Use a module

use auxiliary/scanner/portscan/syn

[Interactive] Show module options (module needs to be loaded first)

show options

[Interactive] Set value of variable

set variable_name value

[Interactive] Run a module (module needs to be loaded and options need to be set first)

run|exploit
made by @shridhargupta | data from tldr-pages