1

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?

oguz ismail
  • 1
  • 16
  • 47
  • 69
MaskedBandit1
  • 29
  • 1
  • 10

1 Answers1

0

You need to use:

msfconsole -q -x " use exploit/multi/handler; set rhost $targetip;
set lport $lport ; explot ;

in os.system.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
GoktugCetin
  • 136
  • 1
  • 8