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> </tr>
</thead> </thead>
<tbody> <tbody>
<% @all_exploits.each do |m| %> <% @all_exploits.each_index do |i|
m = @all_exploits[i]
%>
<tr> <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> <td><%= m.description %></td>
</tr> </tr>
<% end %> <% end %>

View File

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

View File

@ -6,9 +6,11 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<% @all_payloads.each do |m| %> <% @all_payloads.each_index do |i|
m = @all_payloads[i]
%>
<tr> <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> <td><%= m.description %></td>
</tr> </tr>
<% end %> <% end %>

View File

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