module Msf
module Ui
module Web
###
#
# This class implements helper methods for sharing across web pages.
#
###
module Common
#
# Returns the header string that is common to most pages.
#
def self.header(v, active = "none")
"
"
end
#
# Returns the HTML for displaying an icon for each platform the supplied
# module instance supports.
#
def self.module_icons(modinst)
return "" if modinst.nil?
platform_icons(modinst.platform)
end
def self.target_icons(target)
return "" if target.nil?
platform_icons(target.platform)
end
def self.platform_icons(platform)
# nil?
return "" if (platform.nil?)
# If this module has no platforms, then we don't show any icons...
return "" if (platform.empty?)
# Otherwise, get the platform specific information...
html = ""
[
[ Msf::Module::Platform::Windows, "win32.gif", "win32" ],
[ Msf::Module::Platform::Linux, "linux.gif", "linux" ],
[ Msf::Module::Platform::Solaris, "sun.gif", "solaris" ],
[ Msf::Module::Platform::OSX, "osx.gif", "osx" ],
[ Msf::Module::Platform::BSD, "bsd.gif", "bsd" ],
].each { |plat|
if (platform.supports?(Msf::Module::PlatformList.new(plat[0])) == true)
html += ""
end
}
html
end
end
end
end
end