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-b9f4589650daunstable
parent
19db412383
commit
69ce7eed1b
|
@ -36,18 +36,22 @@ module MeterpreterOptions
|
||||||
session.init_ui(self.user_input, self.user_output)
|
session.init_ui(self.user_input, self.user_output)
|
||||||
|
|
||||||
if (datastore['AutoLoadStdapi'] == true)
|
if (datastore['AutoLoadStdapi'] == true)
|
||||||
|
|
||||||
session.load_stdapi
|
session.load_stdapi
|
||||||
mod = framework.modules.create(session.via_exploit)
|
|
||||||
|
|
||||||
if datastore['AutoSystemInfo']
|
if datastore['AutoSystemInfo']
|
||||||
session.load_session_info
|
session.load_session_info
|
||||||
end
|
end
|
||||||
|
|
||||||
if session.railgun and session.railgun.shell32.IsUserAnAdmin()["return"] == true
|
begin
|
||||||
session.load_priv
|
::Timeout.timeout(10) do
|
||||||
session.info += " (ADMIN)"
|
if session.railgun and session.railgun.shell32.IsUserAnAdmin()["return"] == true
|
||||||
|
session.load_priv
|
||||||
|
session.info += " (ADMIN)"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
rescue ::Exception
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if (datastore['InitialAutoRunScript'].empty? == false)
|
if (datastore['InitialAutoRunScript'].empty? == false)
|
||||||
|
|
Loading…
Reference in New Issue