2012-06-29 00:18:28 -05:00
|
|
|
# -*- coding: binary -*-
|
2005-07-13 18:06:12 +00:00
|
|
|
require 'abbrev'
|
2005-05-30 07:01:25 +00:00
|
|
|
|
|
|
|
|
#
|
2005-05-30 23:15:40 +00:00
|
|
|
# This is the definitions of which Platforms the framework knows about. The
|
|
|
|
|
# relative ranks are used to support ranges, and the Short names are used to
|
|
|
|
|
# allow for more convenient specification of the platforms....
|
2005-05-30 22:34:02 +00:00
|
|
|
#
|
|
|
|
|
|
2005-05-30 07:01:25 +00:00
|
|
|
class Msf::Module::Platform
|
|
|
|
|
|
2005-05-30 23:15:40 +00:00
|
|
|
Rank = 0
|
2015-04-13 13:21:41 +05:00
|
|
|
# actually, having an argument of '' is what to do for wanting 'all'
|
2005-05-30 23:15:40 +00:00
|
|
|
Short = "all"
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2011-10-16 09:53:53 +00:00
|
|
|
class << self
|
2005-07-13 18:06:12 +00:00
|
|
|
attr_accessor :full_name
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
#
|
2015-04-13 13:21:41 +05:00
|
|
|
# Returns the "real" name of the module instance, accounting for potentially
|
2005-07-13 18:06:12 +00:00
|
|
|
# aliased class names.
|
|
|
|
|
#
|
|
|
|
|
def self.realname
|
|
|
|
|
# Use the cached version if one has been set
|
|
|
|
|
return full_name if (full_name)
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
# Otherwise, generate it and cache it
|
|
|
|
|
names = []
|
|
|
|
|
c = Msf::Module::Platform
|
|
|
|
|
name.split('::')[3 .. -1].each { |part|
|
|
|
|
|
c = c.const_get(part)
|
|
|
|
|
if (c.const_defined?('RealName') == true)
|
2011-11-20 12:32:06 +11:00
|
|
|
names << c.const_get('RealName')
|
2005-07-13 18:06:12 +00:00
|
|
|
else
|
|
|
|
|
names << part
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|
full_name = names.join(' ')
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
#
|
2005-11-15 15:11:43 +00:00
|
|
|
# Calls the class method.
|
2005-07-13 18:06:12 +00:00
|
|
|
#
|
|
|
|
|
def find_children
|
|
|
|
|
self.class.find_children
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-05-30 07:01:25 +00:00
|
|
|
#
|
2005-11-15 15:11:43 +00:00
|
|
|
# The magic to try to build out a Platform from a string.
|
2005-05-30 07:01:25 +00:00
|
|
|
#
|
2005-05-30 22:34:02 +00:00
|
|
|
def self.find_platform(str)
|
|
|
|
|
# remove any whitespace and downcase
|
2005-05-30 23:46:34 +00:00
|
|
|
str = str.gsub(' ', '').downcase
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
# Start at the base platform module
|
2008-09-24 04:15:10 +00:00
|
|
|
mod = ::Msf::Module::Platform
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
# Scan forward, trying to find the end module
|
2005-05-30 22:34:02 +00:00
|
|
|
while str.length > 0
|
2005-07-13 18:06:12 +00:00
|
|
|
mod, str = find_portion(mod, str)
|
2005-05-30 22:34:02 +00:00
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-05-30 22:34:02 +00:00
|
|
|
return mod
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
#
|
2005-11-15 15:11:43 +00:00
|
|
|
# Finds all inherited children from a given module.
|
2011-11-20 12:32:06 +11:00
|
|
|
#
|
2005-05-31 00:36:22 +00:00
|
|
|
def self.find_children
|
2009-06-25 17:59:51 +00:00
|
|
|
@subclasses ||= []
|
|
|
|
|
@subclasses.sort_by { |a| a::Rank }
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2009-06-25 17:59:51 +00:00
|
|
|
def self.inherited(subclass)
|
|
|
|
|
@subclasses ||= []
|
|
|
|
|
@subclasses << subclass
|
2005-05-30 07:01:25 +00:00
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
#
|
|
|
|
|
# Builds the abbreviation set for every module starting from
|
2005-11-15 15:11:43 +00:00
|
|
|
# a given point.
|
2005-07-13 18:06:12 +00:00
|
|
|
#
|
|
|
|
|
def self.build_child_platform_abbrev(mod)
|
|
|
|
|
# Flush out any non-class and non-inherited children
|
|
|
|
|
children = mod.find_children
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
# No children to speak of?
|
|
|
|
|
return if (children.length == 0)
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
# Build the list of names & rankings
|
|
|
|
|
names = {}
|
|
|
|
|
ranked = {}
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
children.map { |c|
|
|
|
|
|
name = c.name.split('::')[-1].downcase
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
# If the platform has an alias, such as a portion that may
|
|
|
|
|
# start with an integer, use that as the name
|
|
|
|
|
if (c.const_defined?('Alias'))
|
|
|
|
|
als = c.const_get('Alias').downcase
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
names[als] = c
|
|
|
|
|
ranked[als] = c::Rank
|
|
|
|
|
# If the platform has more than one alias, process the list
|
|
|
|
|
elsif (c.const_defined?('Aliases'))
|
|
|
|
|
c.const_get('Aliases').each { |a|
|
|
|
|
|
a = a.downcase
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
names[a] = c
|
|
|
|
|
ranked[a] = c::Rank
|
|
|
|
|
}
|
2005-05-30 07:01:25 +00:00
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
names[name] = c
|
|
|
|
|
ranked[name] = c::Rank
|
2005-05-30 07:01:25 +00:00
|
|
|
}
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
# Calculate their abbreviations
|
|
|
|
|
abbrev = ::Abbrev::abbrev(names.keys)
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
# Set the ranked list and abbreviated list on this module,
|
|
|
|
|
# then walk the children
|
|
|
|
|
mod.const_set('Abbrev', abbrev)
|
|
|
|
|
mod.const_set('Ranks', ranked)
|
|
|
|
|
mod.const_set('Names', names)
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
#
|
|
|
|
|
# Finds the module that best matches the supplied string (or a portion of
|
2005-11-15 15:11:43 +00:00
|
|
|
# the string).
|
2005-07-13 18:06:12 +00:00
|
|
|
#
|
|
|
|
|
def self.find_portion(mod, str)
|
|
|
|
|
# Check to see if we've built the abbreviated cache
|
2008-09-24 04:15:10 +00:00
|
|
|
if (not (
|
|
|
|
|
mod.const_defined?('Abbrev') and
|
|
|
|
|
mod.const_defined?('Names') and
|
|
|
|
|
mod.const_defined?('Ranks')
|
2011-11-20 12:32:06 +11:00
|
|
|
) )
|
|
|
|
|
build_child_platform_abbrev(mod)
|
2005-05-30 22:34:02 +00:00
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2008-09-24 04:15:10 +00:00
|
|
|
if (not mod.const_defined?('Names'))
|
|
|
|
|
elog("Failed to instantiate the platform list for module #{mod}")
|
2017-11-01 05:59:12 -05:00
|
|
|
raise "Failed to instantiate the platform list for module #{mod}"
|
2008-09-24 04:15:10 +00:00
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
abbrev = mod.const_get('Abbrev')
|
|
|
|
|
names = mod.const_get('Names')
|
|
|
|
|
ranks = mod.const_get('Ranks')
|
|
|
|
|
best = nil
|
|
|
|
|
bestlen = 0
|
|
|
|
|
bestmat = nil
|
|
|
|
|
bestrank = 0
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
# Walk through each abbreviation
|
|
|
|
|
abbrev.each { |a|
|
|
|
|
|
# If the abbreviation is too long, no sense in scanning it
|
|
|
|
|
next if (a[0].length > str.length)
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
# If the current abbreviation matches with the
|
|
|
|
|
# supplied string and is better than the previous
|
|
|
|
|
# best match length, use it, but only if it also
|
|
|
|
|
# has a higher rank than the previous match.
|
|
|
|
|
if ((a[0] == str[0, a[0].length]) and
|
|
|
|
|
(a[0].length > bestlen) and
|
|
|
|
|
(bestrank == nil or bestrank <= ranks[a[1]]))
|
|
|
|
|
best = [ names[a[1]], str[a[0].length .. -1] ]
|
|
|
|
|
bestlen = a[0].length
|
|
|
|
|
bestmat = a[0]
|
|
|
|
|
bestrank = ranks[a[1]]
|
|
|
|
|
end
|
|
|
|
|
}
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
# If we couldn't find a best match at this stage, it's time to warn.
|
|
|
|
|
if (best == nil)
|
2008-12-19 07:11:08 +00:00
|
|
|
raise ArgumentError, "No classes in #{mod} for #{str}!", caller
|
2005-07-13 18:06:12 +00:00
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
return best
|
2005-05-30 07:01:25 +00:00
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-11-15 15:11:43 +00:00
|
|
|
private_class_method :build_child_platform_abbrev # :nodoc:
|
|
|
|
|
private_class_method :find_portion # :nodoc:
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:54:41 +00:00
|
|
|
##
|
|
|
|
|
#
|
|
|
|
|
# Builtin platforms
|
|
|
|
|
#
|
|
|
|
|
##
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2018-10-08 14:31:31 -05:00
|
|
|
#
|
|
|
|
|
# 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
|
|
|
|
|
|
2005-07-13 18:54:41 +00:00
|
|
|
#
|
|
|
|
|
# Windows
|
|
|
|
|
#
|
2005-05-30 07:01:25 +00:00
|
|
|
class Windows < Msf::Module::Platform
|
2018-10-08 14:31:31 -05:00
|
|
|
Rank = 100
|
2005-07-13 18:06:12 +00:00
|
|
|
# Windows 95
|
|
|
|
|
class W95 < Windows
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "95"
|
|
|
|
|
RealName = "95"
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
# Windows 98
|
|
|
|
|
class W98 < Windows
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "98"
|
|
|
|
|
RealName = "98"
|
|
|
|
|
class FE < W98
|
|
|
|
|
Rank = 100
|
|
|
|
|
end
|
|
|
|
|
class SE < W98
|
|
|
|
|
Rank = 200
|
|
|
|
|
end
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
# Windows ME
|
|
|
|
|
class ME < Windows
|
|
|
|
|
Rank = 100
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
# Windows NT
|
|
|
|
|
class NT < Windows
|
|
|
|
|
Rank = 100
|
|
|
|
|
class SP0 < NT
|
|
|
|
|
Rank = 100
|
|
|
|
|
end
|
|
|
|
|
class SP1 < NT
|
|
|
|
|
Rank = 200
|
|
|
|
|
end
|
|
|
|
|
class SP2 < NT
|
|
|
|
|
Rank = 300
|
|
|
|
|
end
|
|
|
|
|
class SP3 < NT
|
|
|
|
|
Rank = 400
|
|
|
|
|
end
|
|
|
|
|
class SP4 < NT
|
|
|
|
|
Rank = 500
|
|
|
|
|
end
|
|
|
|
|
class SP5 < NT
|
|
|
|
|
Rank = 600
|
|
|
|
|
end
|
|
|
|
|
class SP6 < NT
|
|
|
|
|
Rank = 700
|
|
|
|
|
end
|
|
|
|
|
class SP6a < NT
|
|
|
|
|
Rank = 800
|
|
|
|
|
end
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
# Windows 2000
|
|
|
|
|
class W2000 < Windows
|
|
|
|
|
Rank = 200
|
|
|
|
|
Aliases = [ "2000", "2K" ]
|
|
|
|
|
RealName = "2000"
|
|
|
|
|
class SP0 < W2000
|
2010-03-05 08:26:51 +00:00
|
|
|
Aliases = [ "sp0-4", "sp0-sp4" ]
|
2005-07-13 18:06:12 +00:00
|
|
|
Rank = 100
|
|
|
|
|
end
|
|
|
|
|
class SP1 < W2000
|
|
|
|
|
Rank = 200
|
|
|
|
|
end
|
|
|
|
|
class SP2 < W2000
|
|
|
|
|
Rank = 300
|
|
|
|
|
end
|
|
|
|
|
class SP3 < W2000
|
|
|
|
|
Rank = 400
|
|
|
|
|
end
|
|
|
|
|
class SP4 < W2000
|
|
|
|
|
Rank = 500
|
|
|
|
|
end
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
# Windows XP
|
|
|
|
|
class XP < Windows
|
|
|
|
|
Rank = 300
|
|
|
|
|
class SP0 < XP
|
2010-03-05 08:26:51 +00:00
|
|
|
# It's not clear whether this should be assigned to the lower
|
|
|
|
|
# or higher bound of the range.
|
|
|
|
|
Aliases = [ "sp0-1", "sp0/1", "sp0-sp1", "sp0/sp1", "sp0-2", "sp0-sp2", "sp0-3", "sp0-sp3" ]
|
2005-07-13 18:06:12 +00:00
|
|
|
Rank = 100
|
|
|
|
|
end
|
|
|
|
|
class SP1 < XP
|
|
|
|
|
Rank = 200
|
|
|
|
|
end
|
|
|
|
|
class SP2 < XP
|
|
|
|
|
Rank = 300
|
|
|
|
|
end
|
2010-03-05 08:26:51 +00:00
|
|
|
class SP3 < XP
|
|
|
|
|
Rank = 400
|
|
|
|
|
end
|
2005-07-13 18:06:12 +00:00
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:06:12 +00:00
|
|
|
# Windows 2003 Server
|
|
|
|
|
class W2003 < Windows
|
|
|
|
|
Rank = 400
|
|
|
|
|
Aliases = [ "2003", "2003 Server", "2K3" ]
|
|
|
|
|
RealName = "2003"
|
|
|
|
|
class SP0 < W2003
|
|
|
|
|
Rank = 100
|
|
|
|
|
end
|
|
|
|
|
class SP1 < W2003
|
|
|
|
|
Rank = 200
|
2005-05-30 07:01:25 +00:00
|
|
|
end
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2010-03-05 08:26:51 +00:00
|
|
|
class Vista < Windows
|
|
|
|
|
Rank = 500
|
|
|
|
|
class SP0 < Vista
|
|
|
|
|
Aliases = [ "sp0-1", "sp0/1", "sp0-sp1", "sp0/sp1" ]
|
|
|
|
|
Rank = 100
|
|
|
|
|
end
|
|
|
|
|
class SP1 < Vista
|
|
|
|
|
Rank = 200
|
|
|
|
|
end
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2010-03-05 08:26:51 +00:00
|
|
|
class W7 < Windows
|
|
|
|
|
Rank = 600
|
|
|
|
|
RealName = "7"
|
|
|
|
|
end
|
2013-11-13 13:27:44 -06:00
|
|
|
|
|
|
|
|
class W8 < Windows
|
|
|
|
|
Rank = 700
|
|
|
|
|
RealName = "8"
|
|
|
|
|
end
|
2005-05-30 07:01:25 +00:00
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2008-01-28 03:06:31 +00:00
|
|
|
#
|
|
|
|
|
# NetWare
|
|
|
|
|
#
|
|
|
|
|
class Netware < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "netware"
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2013-04-12 18:35:03 +01:00
|
|
|
#
|
|
|
|
|
# Android
|
|
|
|
|
#
|
|
|
|
|
class Android < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "android"
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2010-07-11 19:46:55 +00:00
|
|
|
#
|
|
|
|
|
# Java
|
|
|
|
|
#
|
|
|
|
|
class Java < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "java"
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2017-08-23 16:58:48 -05:00
|
|
|
#
|
|
|
|
|
# R
|
|
|
|
|
#
|
|
|
|
|
class R < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "r"
|
|
|
|
|
end
|
|
|
|
|
|
2013-01-09 23:10:13 -06:00
|
|
|
#
|
|
|
|
|
# Ruby
|
|
|
|
|
#
|
|
|
|
|
class Ruby < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "ruby"
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:54:41 +00:00
|
|
|
#
|
|
|
|
|
# Linux
|
|
|
|
|
#
|
2005-07-13 18:06:12 +00:00
|
|
|
class Linux < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
2005-10-27 02:54:39 +00:00
|
|
|
Alias = "linux"
|
2005-07-13 18:06:12 +00:00
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2011-10-13 22:41:48 +00:00
|
|
|
#
|
|
|
|
|
# Cisco
|
|
|
|
|
#
|
|
|
|
|
class Cisco < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "cisco"
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2018-02-22 21:08:21 -05:00
|
|
|
#
|
|
|
|
|
# Juniper
|
|
|
|
|
#
|
|
|
|
|
class Juniper < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "juniper"
|
|
|
|
|
end
|
|
|
|
|
|
2019-03-12 20:35:32 -04:00
|
|
|
#
|
|
|
|
|
# Ubiquiti Unifi
|
|
|
|
|
#
|
|
|
|
|
class Unifi < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "unifi"
|
|
|
|
|
end
|
|
|
|
|
|
2018-07-30 14:53:53 -04:00
|
|
|
#
|
|
|
|
|
# Brocade
|
|
|
|
|
#
|
|
|
|
|
class Brocade < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "brocade"
|
|
|
|
|
end
|
|
|
|
|
|
2020-07-18 07:45:24 -04:00
|
|
|
#
|
|
|
|
|
# MikroTik
|
|
|
|
|
#
|
|
|
|
|
class Mikrotik < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "mikrotik"
|
2020-08-07 21:36:56 -04:00
|
|
|
end
|
2020-07-26 07:16:06 -04:00
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Arista
|
|
|
|
|
#
|
|
|
|
|
class Arista < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "arista"
|
2020-07-18 07:45:24 -04:00
|
|
|
end
|
|
|
|
|
|
2005-07-13 18:54:41 +00:00
|
|
|
#
|
|
|
|
|
# Solaris
|
|
|
|
|
#
|
2005-07-13 18:06:12 +00:00
|
|
|
class Solaris < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
2005-07-13 18:54:41 +00:00
|
|
|
class V4
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "4"
|
|
|
|
|
end
|
|
|
|
|
class V5
|
|
|
|
|
Rank = 200
|
|
|
|
|
Alias = "5"
|
|
|
|
|
end
|
|
|
|
|
class V6
|
|
|
|
|
Rank = 300
|
|
|
|
|
Alias = "6"
|
|
|
|
|
end
|
|
|
|
|
class V7
|
|
|
|
|
Rank = 400
|
|
|
|
|
Alias = "7"
|
|
|
|
|
end
|
|
|
|
|
class V8
|
2005-10-27 02:54:39 +00:00
|
|
|
Rank = 500
|
|
|
|
|
Alias = "8"
|
|
|
|
|
end
|
|
|
|
|
class V9
|
|
|
|
|
Rank = 600
|
|
|
|
|
Alias = "9"
|
|
|
|
|
end
|
|
|
|
|
class V10
|
|
|
|
|
Rank = 700
|
|
|
|
|
Alias = "10"
|
2005-07-13 18:54:41 +00:00
|
|
|
end
|
2016-05-09 05:11:09 -05:00
|
|
|
class V11
|
|
|
|
|
Rank = 800
|
|
|
|
|
Alias = "11"
|
|
|
|
|
end
|
2005-07-13 18:06:12 +00:00
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:54:41 +00:00
|
|
|
#
|
|
|
|
|
# OSX
|
|
|
|
|
#
|
2005-07-13 18:06:12 +00:00
|
|
|
class OSX < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:54:41 +00:00
|
|
|
#
|
2005-07-13 18:06:12 +00:00
|
|
|
# Generic BSD
|
2005-07-13 18:54:41 +00:00
|
|
|
#
|
2005-07-13 18:06:12 +00:00
|
|
|
class BSD < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:54:41 +00:00
|
|
|
#
|
|
|
|
|
# OpenBSD
|
|
|
|
|
#
|
2005-07-13 18:06:12 +00:00
|
|
|
class OpenBSD < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:54:41 +00:00
|
|
|
#
|
|
|
|
|
# BSDi
|
|
|
|
|
#
|
2005-07-13 18:06:12 +00:00
|
|
|
class BSDi < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:54:41 +00:00
|
|
|
#
|
|
|
|
|
# NetBSD
|
|
|
|
|
#
|
2005-07-13 18:06:12 +00:00
|
|
|
class NetBSD < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-07-13 18:54:41 +00:00
|
|
|
#
|
|
|
|
|
# FreeBSD
|
|
|
|
|
#
|
2005-07-13 18:06:12 +00:00
|
|
|
class FreeBSD < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2008-09-10 20:13:36 +00:00
|
|
|
#
|
|
|
|
|
# AIX
|
|
|
|
|
#
|
|
|
|
|
class AIX < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "aix"
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2006-01-16 03:36:43 +00:00
|
|
|
#
|
|
|
|
|
# HP-UX
|
|
|
|
|
#
|
|
|
|
|
class HPUX < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "hpux"
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2006-02-05 18:10:08 +00:00
|
|
|
#
|
|
|
|
|
# Irix
|
|
|
|
|
#
|
|
|
|
|
class Irix < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "irix"
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-12-25 22:47:38 +00:00
|
|
|
#
|
|
|
|
|
# Generic Unix
|
|
|
|
|
#
|
|
|
|
|
class Unix < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "unix"
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2006-12-17 07:57:51 +00:00
|
|
|
#
|
|
|
|
|
# Generic PHP
|
|
|
|
|
#
|
|
|
|
|
class PHP < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "php"
|
2011-11-20 12:32:06 +11:00
|
|
|
end
|
2013-02-03 14:59:15 -05:00
|
|
|
|
2013-09-20 18:14:01 -05:00
|
|
|
#
|
|
|
|
|
# JavaScript
|
|
|
|
|
#
|
|
|
|
|
class JavaScript < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "js"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Python
|
|
|
|
|
#
|
|
|
|
|
class Python < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "python"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Node.js
|
|
|
|
|
#
|
|
|
|
|
class NodeJS < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "nodejs"
|
|
|
|
|
end
|
2014-01-02 01:10:08 -06:00
|
|
|
|
|
|
|
|
#
|
2014-01-02 02:22:16 -06:00
|
|
|
# Firefox
|
2014-01-02 01:10:08 -06:00
|
|
|
#
|
|
|
|
|
class Firefox < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "firefox"
|
|
|
|
|
end
|
2015-09-28 10:03:15 -05:00
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Mainframe
|
|
|
|
|
#
|
|
|
|
|
class Mainframe < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "mainframe"
|
|
|
|
|
end
|
2016-11-28 09:34:09 +10:00
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Multi (for wildcard-style platform functions)
|
|
|
|
|
#
|
|
|
|
|
class Multi < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "multi"
|
|
|
|
|
end
|
2017-01-06 19:51:41 -08:00
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Hardware
|
|
|
|
|
#
|
|
|
|
|
class Hardware < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "hardware"
|
|
|
|
|
end
|
|
|
|
|
|
2017-12-12 16:05:23 +08:00
|
|
|
#
|
|
|
|
|
# Apple iOS
|
|
|
|
|
#
|
|
|
|
|
class Apple_iOS < Msf::Module::Platform
|
|
|
|
|
Rank = 100
|
|
|
|
|
Alias = "apple_ios"
|
|
|
|
|
end
|
|
|
|
|
|
2009-06-25 17:59:51 +00:00
|
|
|
end
|