Land #10773, session.platform TypeError fix
This also adds an "unknown" platform class.GSoC/Meterpreter_Web_Console
commit
6c74820843
|
@ -165,12 +165,14 @@ module Metasploit
|
||||||
'aix'
|
'aix'
|
||||||
when /Win32|Windows/
|
when /Win32|Windows/
|
||||||
'windows'
|
'windows'
|
||||||
when /Unknown command or computer name/
|
when /Unknown command or computer name|Line has invalid autocommand/
|
||||||
'cisco-ios'
|
'cisco-ios'
|
||||||
when /unknown keyword/ # ScreenOS
|
when /unknown keyword/ # ScreenOS
|
||||||
'juniper'
|
'juniper'
|
||||||
when /JUNOS Base OS/ #JunOS
|
when /JUNOS Base OS/ #JunOS
|
||||||
'juniper'
|
'juniper'
|
||||||
|
else
|
||||||
|
'unknown'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -892,8 +892,8 @@ class ReadableText
|
||||||
sess_checkin = "<none>"
|
sess_checkin = "<none>"
|
||||||
sess_registration = "No"
|
sess_registration = "No"
|
||||||
|
|
||||||
if session.respond_to?(:platform)
|
if session.respond_to?(:platform) && session.platform
|
||||||
sess_type << " " + session.platform
|
sess_type << " #{session.platform}"
|
||||||
end
|
end
|
||||||
|
|
||||||
if session.respond_to?(:last_checkin) && session.last_checkin
|
if session.respond_to?(:last_checkin) && session.last_checkin
|
||||||
|
|
|
@ -190,11 +190,23 @@ class Msf::Module::Platform
|
||||||
#
|
#
|
||||||
##
|
##
|
||||||
|
|
||||||
|
#
|
||||||
|
# Unknown
|
||||||
|
#
|
||||||
|
# This is a special case for when we're completely unsure of the
|
||||||
|
# platform, such as a crash or default case in code. Only
|
||||||
|
# utilize this as a catch-all.
|
||||||
|
#
|
||||||
|
class Unknown < Msf::Module::Platform
|
||||||
|
Rank = 0 # safeguard with 0 since the platform is completely unknown
|
||||||
|
Alias = "unknown"
|
||||||
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
# Windows
|
# Windows
|
||||||
#
|
#
|
||||||
class Windows < Msf::Module::Platform
|
class Windows < Msf::Module::Platform
|
||||||
Rank = 100
|
Rank = 100
|
||||||
# Windows 95
|
# Windows 95
|
||||||
class W95 < Windows
|
class W95 < Windows
|
||||||
Rank = 100
|
Rank = 100
|
||||||
|
|
Loading…
Reference in New Issue