Wrap the getuid in exception handlers
git-svn-id: file:///home/svn/framework3/trunk@8254 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
8be92ab010
commit
9548e7837f
|
@ -39,8 +39,12 @@ def m_exec(session, cmd)
|
|||
b
|
||||
end
|
||||
|
||||
print_status("Currently running as " + client.sys.config.getuid)
|
||||
print_line("")
|
||||
# Handle exceptions in the getuid() call
|
||||
begin
|
||||
print_status("Currently running as " + client.sys.config.getuid)
|
||||
print_line("")
|
||||
rescue ::Rex::Post::Meterpreter::RequestError
|
||||
end
|
||||
|
||||
print_status("Loading the vdmallowed executable and DLL from the local system...")
|
||||
based = ::File.join(Msf::Config.install_root, "data", "exploits", "kitrap0d")
|
||||
|
@ -84,5 +88,9 @@ print_status("Deleting files...")
|
|||
client.fs.file.rm(tempexe)
|
||||
client.fs.file.rm(tempdll)
|
||||
|
||||
print_status("Now running as " + client.sys.config.getuid)
|
||||
# Handle exceptions in the getuid() call
|
||||
begin
|
||||
print_status("Now running as " + client.sys.config.getuid)
|
||||
rescue ::Rex::Post::Meterpreter::RequestError
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue