More IDE changes and new helper to get the array of available module

licenses (thanks skape!).


git-svn-id: file:///home/svn/framework3/trunk@4051 4d416f70-5f16-0410-b530-b9f4589650da
unstable
lmh 2006-10-24 18:47:21 +00:00
parent 6c2ad54dfd
commit 69ccf0ad8b
4 changed files with 96 additions and 9 deletions

View File

@ -21,8 +21,7 @@ class IdeController < ApplicationController
@the_exploit = session[:exploit] = params[:exploit]
@step = @the_exploit["step"].to_i
elsif @step.nil?
@step = 0
@the_exploit = {}
redirect_to :action => start
end
flash[:error] = ""

View File

@ -66,9 +66,15 @@ module ApplicationHelper
return ARCH_ALL
end
#
# Returns an array suitable for the select form option helper,
# of the available exploit mixins. thanks skape for the new method.
def return_selectable_exploit_mixins()
ret = {}
ret['Connect to a TCP service', '' ]
Msf::Exploit::mixins
end
# Returns an array suitable for the select form option helper,
# of the available module licenses.
def return_selectable_licenses()
LICENSES
end
end

View File

@ -5,7 +5,7 @@
<tr width="100%" align="center">
<td>
<a href="#"
onclick="new Effect.Appear('edit_new')"
onclick="new Effect.Appear('edit_new'); new Effect.Fade('create_new');"
onmouseout="document.getElementById('devil').src = '/images/ide/devil.png';"
onmouseover="document.getElementById('devil').src = '/images/ide/devil_ne.png';">
<img src="/images/ide/devil.png" alt="" id="devil" /> <br />
@ -14,6 +14,7 @@
</td>
<td>
<a href="#"
onclick="new Effect.Appear('create_new'); new Effect.Fade('edit_new');"
onmouseout="document.getElementById('doomed').src = '/images/ide/doomed.png';"
onmouseover="document.getElementById('doomed').src = '/images/ide/doomed_ne.png';">
<img src="/images/ide/doomed.png" alt="" id="doomed" /> <br />
@ -36,8 +37,11 @@
</script>
</div>
<div id="create_new" style="display: none;">
<p>Select the exploit type from the options below:</p>
<%= start_form_tag :action => "wizard" %>
<%= select ("exploit", "type", return_selectable_exploit_mixins()) %>
<%= hidden_field "exploit", "step", :value => 1 %>
<%= select ("exploit", "mixin", return_selectable_exploit_mixins()) %>
<%= submit_tag "Next" %>
<%= end_form_tag %>
</div>
</div>

View File

@ -5,12 +5,90 @@
</p>
<% end %>
<% if @step == 0 %>
<h3>Step 1: Exploit information</h3>
<% if @step == 1 %>
<h3>Step 1: Generic information</h3>
<p>
</p>
<table width="100%">
<%= start_form_tag %>
<%= hidden_field "exploit", "step", :value => 2 %>
<tr>
<td>Name:</td>
<td><%= text_field "exploit", "name" %></td>
</tr>
<tr>
<td>Title:</td>
<td><%= text_field "exploit", "title" %></td>
</tr>
<tr>
<td>Description:</td>
<td><%= text_area "exploit", "description", :cols => 40, :rows => 5 %></td>
</tr>
<tr>
<td>Authors:</td>
<td><%= text_area "exploit", "authors", :cols => 40, :rows => 5 %></td>
</tr>
<tr>
<td>References:</td>
<td><%= text_area "exploit", "references", :cols => 40, :rows => 5 %></td>
</tr>
<tr>
<td>License:</td>
<td><%= select ("exploit", "license", return_selectable_licenses()) %></td>
</tr>
<tr>
<td colspan="2"><%= submit_tag "Next" %></td>
</tr>
<%= end_form_tag %>
</table>
<% elsif @step == 2 %>
<h3>Step 2: Configure payload</h3>
<p>
</p>
<table width="100%">
<%= start_form_tag %>
<%= hidden_field "exploit", "step", :value => 3 %>
<tr>
<td>Space for payload:</td>
<td><%= text_field "exploit", "payload_space" %></td>
</tr>
<tr>
<td>Bad characters:</td>
<td><%= text_field "exploit", "payload_badchars" %></td>
</tr>
<tr>
<td>Prepend:</td>
<td><%= text_field "exploit", "payload_prepend" %></td>
</tr>
<tr>
<td>Append:</td>
<td><%= text_field "exploit", "payload_append" %></td>
</tr>
<tr>
<td>SaveRegisters:</td>
<td><%= text_field "exploit", "payload_saveregs" %></td>
</tr>
<tr>
<td>Previous</td>
<td><%= submit_tag "Next" %></td>
</tr>
<%= end_form_tag %>
</table>
<% elsif @step == 3 %>
<h3>Step 2: Configure targets</h3>
<p>
</p>
<table width="100%">
<%= start_form_tag %>
<%= hidden_field "exploit", "step", :value => 4 %>
<tr>
<td>SaveRegisters:</td>
<td><%= text_field "exploit", "payload_saveregs" %></td>
</tr>
<tr>
<td>Previous</td>
<td><%= submit_tag "Next" %></td>
</tr>
<%= end_form_tag %>
</table>
<% end %>