From 69ccf0ad8bc49f694d208b365e92259043dd3015 Mon Sep 17 00:00:00 2001 From: lmh <> Date: Tue, 24 Oct 2006 18:47:21 +0000 Subject: [PATCH] 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 --- data/msfweb/app/controllers/ide_controller.rb | 3 +- data/msfweb/app/helpers/application_helper.rb | 12 ++- data/msfweb/app/views/ide/start.rhtml | 8 +- data/msfweb/app/views/ide/wizard.rhtml | 82 ++++++++++++++++++- 4 files changed, 96 insertions(+), 9 deletions(-) diff --git a/data/msfweb/app/controllers/ide_controller.rb b/data/msfweb/app/controllers/ide_controller.rb index 2af5f6b843..9681ca97d8 100644 --- a/data/msfweb/app/controllers/ide_controller.rb +++ b/data/msfweb/app/controllers/ide_controller.rb @@ -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] = "" diff --git a/data/msfweb/app/helpers/application_helper.rb b/data/msfweb/app/helpers/application_helper.rb index 9b42301eb2..dca02176b9 100644 --- a/data/msfweb/app/helpers/application_helper.rb +++ b/data/msfweb/app/helpers/application_helper.rb @@ -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 diff --git a/data/msfweb/app/views/ide/start.rhtml b/data/msfweb/app/views/ide/start.rhtml index df20324991..066f1d476c 100644 --- a/data/msfweb/app/views/ide/start.rhtml +++ b/data/msfweb/app/views/ide/start.rhtml @@ -5,7 +5,7 @@
Name: | +<%= text_field "exploit", "name" %> | +
Title: | +<%= text_field "exploit", "title" %> | +
Description: | +<%= text_area "exploit", "description", :cols => 40, :rows => 5 %> | +
Authors: | +<%= text_area "exploit", "authors", :cols => 40, :rows => 5 %> | +
References: | +<%= text_area "exploit", "references", :cols => 40, :rows => 5 %> | +
License: | +<%= select ("exploit", "license", return_selectable_licenses()) %> | +
<%= submit_tag "Next" %> | +
+
+Space for payload: | +<%= text_field "exploit", "payload_space" %> | +
Bad characters: | +<%= text_field "exploit", "payload_badchars" %> | +
Prepend: | +<%= text_field "exploit", "payload_prepend" %> | +
Append: | +<%= text_field "exploit", "payload_append" %> | +
SaveRegisters: | +<%= text_field "exploit", "payload_saveregs" %> | +
Previous | +<%= submit_tag "Next" %> | +
+
+SaveRegisters: | +<%= text_field "exploit", "payload_saveregs" %> | +
Previous | +<%= submit_tag "Next" %> | +