update dynamic module code so it shows up correctly.

git-svn-id: https://beef.googlecode.com/svn/trunk@702 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
sussurro@happypacket.net
2011-01-19 16:38:16 +00:00
parent c89f382eaf
commit 540f806d1d
2 changed files with 7 additions and 2 deletions

View File

@@ -63,6 +63,7 @@ class Msf < BeEF::Command
@info['Name'] = msfinfo['name']
@info['Description'] = msfinfo['description']
@info['MsfModName'] = mod.name
@info['mod-id'] = mod.id
@target = targets
end
@@ -109,6 +110,8 @@ class Msf < BeEF::Command
'mode' => 'local',
'reloadOnChange' => true, # this will trigger a reload of the payload options
'emptyText' => "select a payload..."}
@info['Data'] << { 'name' => 'mod-id' , 'id' => 'mod-id', 'type' => 'hidden', 'value' => @info['mod-id'] }
end

View File

@@ -71,7 +71,7 @@ function generate_form_input_field(form, input, value, disabled, zombie) {
fields: input['store_fields'],
data: input['store_data']
});
input_field = new Ext.form.ComboBox(input_def);
break;
@@ -96,11 +96,12 @@ function generate_form_input_field(form, input, value, disabled, zombie) {
function get_metasploit_payload_details(payload, zombie) {
modid = Ext.getCmp( 'form-zombie-'+zombie.session+'-field-mod-id').value
Ext.Ajax.request({
loadMask: true,
url: '/ui/modules/select/commandmodule.json',
method: 'POST',
params: 'command_module_id=' + '29' + '&' + 'payload_name=' + payload,
params: 'command_module_id=' + modid + '&' + 'payload_name=' + payload,
success: function(resp) {
var module = Ext.decode(resp.responseText);
module = module.command_modules[1];
@@ -369,6 +370,7 @@ function genNewExploitPanel(panel, command_module_id, command_module_name, zombi
var payload_panel = new Ext.Panel({
id: 'payload-panel', // used with Ext.GetCmp('payload-panel')
bodyStyle: 'padding:10px;', // we can assign styles to the main div
layout : 'form',
bodyBorder: false,
height:200,
border: false //we can remove the border of the panel