more hackery on msfweb
git-svn-id: file:///home/svn/incoming/trunk@3076 4d416f70-5f16-0410-b530-b9f4589650daunstable
|
@ -4,12 +4,15 @@
|
|||
<br/>
|
||||
<div align='center' class='navHead'>
|
||||
<table class='moduleList' width='100%' cellspacing='0' border='0'>
|
||||
<% framework.exploits.each_module { |name, mod| %>
|
||||
<% framework.exploits.each_module { |name, mod|
|
||||
modinst = mod.new
|
||||
%>
|
||||
<tr>
|
||||
<td class='moduleIcons' align='center'>
|
||||
<%= Msf::Ui::Web::Common.module_icons(modinst) %>
|
||||
</td>
|
||||
<td class='moduleName'>
|
||||
<a href="exploits.rhtml?name=<%= name %>"><%= mod.new.name %></a>
|
||||
<a href="exploits.rhtml?name=<%= name %>"><%= modinst.name %></a>
|
||||
</td>
|
||||
<td class='moduleSpacer' colspan='2'>
|
||||
</td>
|
||||
|
|
After Width: | Height: | Size: 326 B |
After Width: | Height: | Size: 186 B |
After Width: | Height: | Size: 977 B |
After Width: | Height: | Size: 944 B |
After Width: | Height: | Size: 185 B |
After Width: | Height: | Size: 595 B |
After Width: | Height: | Size: 884 B |
After Width: | Height: | Size: 216 B |
After Width: | Height: | Size: 197 B |
After Width: | Height: | Size: 571 B |
After Width: | Height: | Size: 77 B |
After Width: | Height: | Size: 155 B |
After Width: | Height: | Size: 229 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 885 B |
After Width: | Height: | Size: 264 B |
|
@ -56,6 +56,32 @@ module Common
|
|||
"
|
||||
end
|
||||
|
||||
#
|
||||
# Returns the HTML for displaying an icon for each platform the supplied
|
||||
# module instance supports.
|
||||
#
|
||||
def self.module_icons(modinst)
|
||||
# If this module has no platforms, then we don't show any icons...
|
||||
return "" if (modinst.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 (modinst.platform.supports?(Msf::Module::PlatformList.new(plat[0])) == true)
|
||||
html += "<img src='images/#{plat[1]}' class='iconset' border='0' alt='#{plat[2]}'/>"
|
||||
end
|
||||
}
|
||||
|
||||
html
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -412,8 +412,8 @@ protected
|
|||
'Description' => 'No module description',
|
||||
'Version' => '0',
|
||||
'Author' => nil,
|
||||
'Arch' => nil,
|
||||
'Platform' => '',
|
||||
'Arch' => nil, # No architectures by default.
|
||||
'Platform' => [], # No platforms by default.
|
||||
'Ref' => nil,
|
||||
'Privileged' => false,
|
||||
}.update(self.module_info)
|
||||
|
|
|
@ -70,7 +70,7 @@ class Handler::Erb < Handler
|
|||
resp.body = data
|
||||
end
|
||||
rescue
|
||||
elog("Erb::on_request: #{$!}", LogSource)
|
||||
elog("Erb::on_request: #{$!}\n#{$@.join("\n")}", LogSource)
|
||||
|
||||
# Send a standard 404 message.
|
||||
server.send_e404(cli, req)
|
||||
|
|
|
@ -86,6 +86,7 @@ class Server
|
|||
"bmp" => "image/bmp",
|
||||
"txt" => "text/plain",
|
||||
"css" => "text/css",
|
||||
"ico" => "image/x-icon",
|
||||
}
|
||||
|
||||
#
|
||||
|
|