Skip to main content


We can create text file with sequences of metasploit commands like for example:

use multi/handler
set payload linux/x64/meterpreter/reverse_tcp
set lhost
set lport 4444
run -j

and then execute them with:

msfconsole --resource filename

This will automatically performs the commands when starting the console, we can also load these scripts when inside the console by doing:

resource filename

Creating Resource files from msfconsole

We can also create resource files from an active metasploit session, we can do this by doing:

makerc /tmp/my_cmds