Even though it is older, in python you can use os.system()
to run commands in the terminal.
My question is, if you enter metasploit using msfconsole
, do the proceeding os.system()
calls enter the commands into the msfconsole?
Even though it is older, in python you can use os.system()
to run commands in the terminal.
My question is, if you enter metasploit using msfconsole
, do the proceeding os.system()
calls enter the commands into the msfconsole?
You need to use:
msfconsole -q -x " use exploit/multi/handler; set rhost $targetip;
set lport $lport ; explot ;
in os.system
.