Modules: Resolve many Rubocop violations
This commit is contained in:
@@ -7,33 +7,31 @@
|
||||
#
|
||||
|
||||
class Phonegap_alert_user < BeEF::Core::Command
|
||||
|
||||
def self.options
|
||||
return [{
|
||||
'name' => 'title',
|
||||
'description' => 'Alert title',
|
||||
'ui_label'=>'Title',
|
||||
'value' => 'Beef',
|
||||
'width' => '300px'
|
||||
},{
|
||||
'name' => 'message',
|
||||
'description' => 'Message',
|
||||
'ui_label'=>'Message',
|
||||
'value' => 'Game over!',
|
||||
'width' => '300px'
|
||||
},{
|
||||
'name' => 'buttonName',
|
||||
'description' => 'Default button name',
|
||||
'ui_label'=>'Button name',
|
||||
'value' => 'Done',
|
||||
'width' => '100px'
|
||||
}]
|
||||
def self.options
|
||||
[{
|
||||
'name' => 'title',
|
||||
'description' => 'Alert title',
|
||||
'ui_label' => 'Title',
|
||||
'value' => 'Beef',
|
||||
'width' => '300px'
|
||||
}, {
|
||||
'name' => 'message',
|
||||
'description' => 'Message',
|
||||
'ui_label' => 'Message',
|
||||
'value' => 'Game over!',
|
||||
'width' => '300px'
|
||||
}, {
|
||||
'name' => 'buttonName',
|
||||
'description' => 'Default button name',
|
||||
'ui_label' => 'Button name',
|
||||
'value' => 'Done',
|
||||
'width' => '100px'
|
||||
}]
|
||||
end
|
||||
|
||||
def callback
|
||||
content = {}
|
||||
content['Result'] = @datastore['result']
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,11 +7,9 @@
|
||||
#
|
||||
|
||||
class Phonegap_beep < BeEF::Core::Command
|
||||
|
||||
def post_execute
|
||||
def post_execute
|
||||
content = {}
|
||||
content['result'] = @datastore['result']
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,11 +7,9 @@
|
||||
#
|
||||
|
||||
class Phonegap_check_connection < BeEF::Core::Command
|
||||
|
||||
def post_execute
|
||||
def post_execute
|
||||
content = {}
|
||||
content['result'] = @datastore['result']
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,11 +7,9 @@
|
||||
#
|
||||
|
||||
class Phonegap_detect < BeEF::Core::Command
|
||||
|
||||
def post_execute
|
||||
content = {}
|
||||
content['phonegap'] = @datastore['phonegap']
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -7,27 +7,25 @@
|
||||
#
|
||||
|
||||
class Phonegap_file_upload < BeEF::Core::Command
|
||||
|
||||
def self.options
|
||||
return [{
|
||||
'name' => 'file_upload_dst',
|
||||
'description' => 'Upload a file from device to your server',
|
||||
'ui_label'=>'Destination',
|
||||
'value' => 'http://192.168.9.130/recv-unauth.php',
|
||||
'width' => '300px'
|
||||
},{
|
||||
'name' => 'file_upload_src',
|
||||
'description' => 'path to file on device',
|
||||
'ui_label'=>'File Path',
|
||||
'value' => '/sdcard/myrecording.wav',
|
||||
'width' => '300px'
|
||||
}]
|
||||
def self.options
|
||||
[{
|
||||
'name' => 'file_upload_dst',
|
||||
'description' => 'Upload a file from device to your server',
|
||||
'ui_label' => 'Destination',
|
||||
'value' => 'http://192.168.9.130/recv-unauth.php',
|
||||
'width' => '300px'
|
||||
}, {
|
||||
'name' => 'file_upload_src',
|
||||
'description' => 'path to file on device',
|
||||
'ui_label' => 'File Path',
|
||||
'value' => '/sdcard/myrecording.wav',
|
||||
'width' => '300px'
|
||||
}]
|
||||
end
|
||||
|
||||
def callback
|
||||
content = {}
|
||||
content['Result'] = @datastore['result']
|
||||
save content
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,11 +7,9 @@
|
||||
#
|
||||
|
||||
class Phonegap_geo_locate < BeEF::Core::Command
|
||||
|
||||
def post_execute
|
||||
def post_execute
|
||||
content = {}
|
||||
content['result'] = @datastore['result']
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
# // Phonegap_globalization_status
|
||||
|
||||
class Phonegap_globalization_status < BeEF::Core::Command
|
||||
|
||||
def post_execute
|
||||
content = {}
|
||||
content['Result'] = @datastore['result']
|
||||
save content
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,47 +7,45 @@
|
||||
#
|
||||
|
||||
class Phonegap_keychain < BeEF::Core::Command
|
||||
|
||||
def self.options
|
||||
return [{
|
||||
'name' => 'servicename',
|
||||
'description' => 'Service name',
|
||||
'ui_label'=>'Service name',
|
||||
'value' => 'ServiceNameTest',
|
||||
'width' => '300px'
|
||||
|
||||
},{
|
||||
'name' => 'key',
|
||||
'description' => 'Key',
|
||||
'ui_label'=>'Key',
|
||||
'value' => 'TestKey',
|
||||
'width' => '300px'
|
||||
},{
|
||||
'name' => 'value',
|
||||
'description' => 'Value',
|
||||
'ui_label'=>'Value',
|
||||
'value' => 'TestValue',
|
||||
'width' => '100px'
|
||||
},{
|
||||
'name' => 'action',
|
||||
'type' => 'combobox',
|
||||
'ui_label' => 'Action Type',
|
||||
'store_type' => 'arraystore',
|
||||
'store_fields' => ['action'],
|
||||
'store_data' => [['Read'],['CreateUpdate'],['Delete']],
|
||||
'valueField' => 'action',
|
||||
'value' => 'CreateUpdate',
|
||||
editable: false,
|
||||
'displayField' => 'action',
|
||||
'mode' => 'local',
|
||||
'autoWidth' => true
|
||||
}]
|
||||
def self.options
|
||||
[{
|
||||
'name' => 'servicename',
|
||||
'description' => 'Service name',
|
||||
'ui_label' => 'Service name',
|
||||
'value' => 'ServiceNameTest',
|
||||
'width' => '300px'
|
||||
|
||||
}, {
|
||||
'name' => 'key',
|
||||
'description' => 'Key',
|
||||
'ui_label' => 'Key',
|
||||
'value' => 'TestKey',
|
||||
'width' => '300px'
|
||||
}, {
|
||||
'name' => 'value',
|
||||
'description' => 'Value',
|
||||
'ui_label' => 'Value',
|
||||
'value' => 'TestValue',
|
||||
'width' => '100px'
|
||||
}, {
|
||||
'name' => 'action',
|
||||
'type' => 'combobox',
|
||||
'ui_label' => 'Action Type',
|
||||
'store_type' => 'arraystore',
|
||||
'store_fields' => ['action'],
|
||||
'store_data' => [['Read'], ['CreateUpdate'], ['Delete']],
|
||||
'valueField' => 'action',
|
||||
'value' => 'CreateUpdate',
|
||||
editable: false,
|
||||
'displayField' => 'action',
|
||||
'mode' => 'local',
|
||||
'autoWidth' => true
|
||||
}]
|
||||
end
|
||||
|
||||
def callback
|
||||
content = {}
|
||||
content['Result'] = @datastore['result']
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
# // phonegap_list_contacts
|
||||
|
||||
class Phonegap_list_contacts < BeEF::Core::Command
|
||||
|
||||
def post_execute
|
||||
content = {}
|
||||
content['Result'] = @datastore['result']
|
||||
save content
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,21 +7,19 @@
|
||||
#
|
||||
|
||||
class Phonegap_list_files < BeEF::Core::Command
|
||||
|
||||
def self.options
|
||||
return [{
|
||||
'name' => 'directory',
|
||||
'description' => 'List files in this directory',
|
||||
'ui_label'=>'Directory',
|
||||
'value' => '/',
|
||||
'width' => '300px'
|
||||
}]
|
||||
def self.options
|
||||
[{
|
||||
'name' => 'directory',
|
||||
'description' => 'List files in this directory',
|
||||
'ui_label' => 'Directory',
|
||||
'value' => '/',
|
||||
'width' => '300px'
|
||||
}]
|
||||
end
|
||||
|
||||
def callback
|
||||
content = {}
|
||||
content['Result'] = @datastore['result']
|
||||
save content
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,11 +6,9 @@
|
||||
|
||||
# persist on over app's sleep/wake events
|
||||
class Phonegap_persist_resume < BeEF::Core::Command
|
||||
|
||||
def post_execute
|
||||
def post_execute
|
||||
content = {}
|
||||
content['result'] = @datastore['result']
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,20 +7,18 @@
|
||||
#
|
||||
|
||||
class Phonegap_persistence < BeEF::Core::Command
|
||||
|
||||
def self.options
|
||||
|
||||
@configuration = BeEF::Core::Configuration.instance
|
||||
proto = @configuration.beef_proto
|
||||
beef_host = @configuration.beef_host
|
||||
beef_port = @configuration.beef_port
|
||||
hook_file = @configuration.hook_file_path
|
||||
|
||||
return [{
|
||||
[{
|
||||
'name' => 'hook_url',
|
||||
'description' => 'The URL of your BeEF hook',
|
||||
'ui_label'=>'Hook URL',
|
||||
'value' => proto + '://'+beef_host+':'+beef_port+hook_file,
|
||||
'ui_label' => 'Hook URL',
|
||||
'value' => "#{proto}://#{beef_host}:#{beef_port}#{hook_file}",
|
||||
'width' => '300px'
|
||||
}]
|
||||
end
|
||||
@@ -29,6 +27,5 @@ class Phonegap_persistence < BeEF::Core::Command
|
||||
content = {}
|
||||
content['result'] = @datastore['result']
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -10,5 +10,5 @@ class Phonegap_plugin_detection < BeEF::Core::Command
|
||||
content = {}
|
||||
content['Result'] = @datastore['result']
|
||||
save content
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,46 +7,44 @@
|
||||
#
|
||||
|
||||
class Phonegap_prompt_user < BeEF::Core::Command
|
||||
|
||||
def self.options
|
||||
return [{
|
||||
'name' => 'title',
|
||||
'description' => 'Prompt title',
|
||||
'ui_label'=>'Title',
|
||||
'value' => 'Apple ID',
|
||||
'width' => '300px'
|
||||
|
||||
},{
|
||||
'name' => 'question',
|
||||
'description' => 'Prompt question',
|
||||
'ui_label'=>'Question',
|
||||
'value' => 'Please enter your Apple ID password',
|
||||
'width' => '300px'
|
||||
},{
|
||||
'name' => 'ans_yes',
|
||||
'description' => 'Prompt positive answer button label',
|
||||
'ui_label'=>'Yes',
|
||||
'value' => 'Submit',
|
||||
'width' => '100px'
|
||||
},{
|
||||
'name' => 'ans_no',
|
||||
'description' => 'Prompt negative answer button label',
|
||||
'ui_label'=>'No',
|
||||
'value' => 'Cancel',
|
||||
'width' => '100px'
|
||||
},{
|
||||
'name' => 'text',
|
||||
'description' => 'Default text to display',
|
||||
'ui_label'=>'Default text',
|
||||
'value' => 'Password',
|
||||
'width' => '100px'
|
||||
}]
|
||||
def self.options
|
||||
[{
|
||||
'name' => 'title',
|
||||
'description' => 'Prompt title',
|
||||
'ui_label' => 'Title',
|
||||
'value' => 'Apple ID',
|
||||
'width' => '300px'
|
||||
|
||||
}, {
|
||||
'name' => 'question',
|
||||
'description' => 'Prompt question',
|
||||
'ui_label' => 'Question',
|
||||
'value' => 'Please enter your Apple ID password',
|
||||
'width' => '300px'
|
||||
}, {
|
||||
'name' => 'ans_yes',
|
||||
'description' => 'Prompt positive answer button label',
|
||||
'ui_label' => 'Yes',
|
||||
'value' => 'Submit',
|
||||
'width' => '100px'
|
||||
}, {
|
||||
'name' => 'ans_no',
|
||||
'description' => 'Prompt negative answer button label',
|
||||
'ui_label' => 'No',
|
||||
'value' => 'Cancel',
|
||||
'width' => '100px'
|
||||
}, {
|
||||
'name' => 'text',
|
||||
'description' => 'Default text to display',
|
||||
'ui_label' => 'Default text',
|
||||
'value' => 'Password',
|
||||
'width' => '100px'
|
||||
}]
|
||||
end
|
||||
|
||||
def callback
|
||||
content = {}
|
||||
content['Result'] = @datastore['result']
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,21 +7,18 @@
|
||||
#
|
||||
|
||||
class Phonegap_start_record_audio < BeEF::Core::Command
|
||||
|
||||
def self.options
|
||||
return [
|
||||
{'name' => 'file_name',
|
||||
'description' => 'File name for audio recording',
|
||||
'ui_label' => 'File Name',
|
||||
'value' => 'myrecording.wav'
|
||||
}
|
||||
[
|
||||
{ 'name' => 'file_name',
|
||||
'description' => 'File name for audio recording',
|
||||
'ui_label' => 'File Name',
|
||||
'value' => 'myrecording.wav' }
|
||||
]
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def post_execute
|
||||
content = {}
|
||||
content['file_name'] = @datastore['file_name']
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -7,6 +7,4 @@
|
||||
#
|
||||
|
||||
class Phonegap_stop_record_audio < BeEF::Core::Command
|
||||
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user