Switch ti index

git-svn-id: file:///home/svn/framework3/trunk@3969 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2006-09-26 22:22:23 +00:00
parent 767c9bae3f
commit a8c5d4668a
4 changed files with 12 additions and 16 deletions

View File

@ -6,9 +6,11 @@
</tr>
</thead>
<tbody>
<% @all_exploits.each do |m| %>
<% @all_exploits.each_index do |i|
m = @all_exploits[i]
%>
<tr>
<td><a onClick="window.parent.openModuleWindow('exploits', '<%= m.refname.gsub('/', ':') %>', '<%= m.name %>')" href="#"><%= m.name %></a></td>
<td><a onClick="window.parent.openModuleWindow('exploits', '<%= i %>', '<%= m.name %>')" href="#"><%= m.name %></a></td>
<td><%= m.description %></td>
</tr>
<% end %>

View File

@ -1,11 +1,7 @@
<%
modinst = nil
modname = params[:id].gsub(':', '/')
@all_exploits.each do |m|
modinst = m if m.refname == modname
end
modidx = (params[:id] || 0).to_i
modinst = @all_exploits[modidx]
%>
<table width='100%' cellspacing='0' cellpadding='0' border='0'>

View File

@ -6,9 +6,11 @@
</tr>
</thead>
<tbody>
<% @all_payloads.each do |m| %>
<% @all_payloads.each_index do |i|
m = @all_payloads[i]
%>
<tr>
<td><a onClick="window.parent.openModuleWindow('payloads', '<%= m.refname.gsub('/', ':') %>', '<%= m.name %>')" href="#"><%= m.name %></a></td>
<td><a onClick="window.parent.openModuleWindow('payloads', '<%= i %>', '<%= m.name %>')" href="#"><%= m.name %></a></td>
<td><%= m.description %></td>
</tr>
<% end %>

View File

@ -1,11 +1,7 @@
<%
modinst = nil
modname = params[:id].gsub(':', '/')
@all_payloads.each do |m|
modinst = m if m.refname == modname
end
modidx = (params[:id] || 0).to_i
modinst = @all_payloads[modidx]
%>
<table width='100%' cellspacing='0' cellpadding='0' border='0'>