Wrap the admin check in case the OS doesn't support this API (WinNT, Win2000)

git-svn-id: file:///home/svn/framework3/trunk@10390 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2010-09-20 04:58:25 +00:00
parent 19db412383
commit 69ce7eed1b
1 changed files with 10 additions and 6 deletions

View File

@ -36,18 +36,22 @@ module MeterpreterOptions
session.init_ui(self.user_input, self.user_output)
if (datastore['AutoLoadStdapi'] == true)
session.load_stdapi
mod = framework.modules.create(session.via_exploit)
if datastore['AutoSystemInfo']
session.load_session_info
end
if session.railgun and session.railgun.shell32.IsUserAnAdmin()["return"] == true
session.load_priv
session.info += " (ADMIN)"
begin
::Timeout.timeout(10) do
if session.railgun and session.railgun.shell32.IsUserAnAdmin()["return"] == true
session.load_priv
session.info += " (ADMIN)"
end
end
rescue ::Exception
end
end
if (datastore['InitialAutoRunScript'].empty? == false)