Is it possible to execute a command on the local computer in meterpreter?
The 'execute' command runs a command on the target
The 'shell' command will present you with a standard shell on the target system.
If you want to run the command on the attacker host press Ctrl+Z to background the Meterpreter shell, and issue your command in the Metasploit shell. You can return to Meterpreter with the
this is correct. But how to automate that? I have create a file: `msfconsole -r file.rb` but commands are run only within the `msfconsole` application. How to automate the shell commands? Or how to automate the `execute -f cmd.exe -i -H` IN the meterpreter?
@Sebastian I think this post will answer your question: http://hexesec.wordpress.com/2010/07/02/scripting-post-exploitation/