Catch possible exception if WTSGetActiveConsoleSessionId isn't available on the target machine
parent
3cd2caca1a
commit
e07868d613
|
@ -46,7 +46,12 @@ class Metasploit3 < Msf::Post
|
||||||
uac = is_uac_enabled? ? 'True' : 'False'
|
uac = is_uac_enabled? ? 'True' : 'False'
|
||||||
admin = is_admin? ? 'True' : 'False'
|
admin = is_admin? ? 'True' : 'False'
|
||||||
uid = client.sys.config.getuid.inspect
|
uid = client.sys.config.getuid.inspect
|
||||||
|
begin
|
||||||
|
# Older OS might not have this (min supported is XP)
|
||||||
fid = client.railgun.kernel32.WTSGetActiveConsoleSessionId["return"]
|
fid = client.railgun.kernel32.WTSGetActiveConsoleSessionId["return"]
|
||||||
|
rescue
|
||||||
|
fid = 'N/A'
|
||||||
|
end
|
||||||
privs = client.sys.config.getprivs
|
privs = client.sys.config.getprivs
|
||||||
|
|
||||||
# Store in tables
|
# Store in tables
|
||||||
|
|
Loading…
Reference in New Issue