more hackery on msfweb

git-svn-id: file:///home/svn/incoming/trunk@3076 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
Matt Miller 2005-11-24 04:23:43 +00:00
parent a2acc04831
commit a19e98757d
21 changed files with 35 additions and 5 deletions

View File

@ -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>

BIN
data/msfweb/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

BIN
data/msfweb/images/aix.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 977 B

BIN
data/msfweb/images/any.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 B

BIN
data/msfweb/images/be.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

BIN
data/msfweb/images/bsd.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

BIN
data/msfweb/images/hpux.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

BIN
data/msfweb/images/irix.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 B

BIN
data/msfweb/images/os2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

BIN
data/msfweb/images/osx.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

BIN
data/msfweb/images/sun.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -86,6 +86,7 @@ class Server
"bmp" => "image/bmp",
"txt" => "text/plain",
"css" => "text/css",
"ico" => "image/x-icon",
}
#