Modules: Resolve many Rubocop violations
This commit is contained in:
@@ -4,21 +4,21 @@
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
class Inter_protocol_redis < BeEF::Core::Command
|
||||
|
||||
def self.options
|
||||
cmd = 'set server:name "BeEF says:\\\\nm00!"\\nquit\\n'
|
||||
return [
|
||||
{'name'=>'rhost', 'ui_label'=>'Target Address', 'value'=>'127.0.0.1'},
|
||||
{'name'=>'rport', 'ui_label'=>'Target Port', 'value'=>'6379'},
|
||||
{'name'=>'timeout', 'ui_label'=>'Timeout (s)', 'value'=>'15'},
|
||||
{'name'=>'commands','ui_label'=>'Redis commands', 'description'=>"Enter Redis commands to execute. Note: Use '\\n' to seperate Redis commands and '\\\\n' for new lines.", 'type'=>'textarea', 'value'=>cmd, 'width'=>'200px' }
|
||||
[
|
||||
{ 'name' => 'rhost', 'ui_label' => 'Target Address', 'value' => '127.0.0.1' },
|
||||
{ 'name' => 'rport', 'ui_label' => 'Target Port', 'value' => '6379' },
|
||||
{ 'name' => 'timeout', 'ui_label' => 'Timeout (s)', 'value' => '15' },
|
||||
{ 'name' => 'commands', 'ui_label' => 'Redis commands', 'description' => "Enter Redis commands to execute. Note: Use '\\n' to seperate Redis commands and '\\\\n' for new lines.",
|
||||
'type' => 'textarea', 'value' => cmd, 'width' => '200px' }
|
||||
]
|
||||
end
|
||||
|
||||
def post_execute
|
||||
content = {}
|
||||
content['result'] = @datastore['result'] if not @datastore['result'].nil?
|
||||
content['fail'] = @datastore['fail'] if not @datastore['fail'].nil?
|
||||
content['result'] = @datastore['result'] unless @datastore['result'].nil?
|
||||
content['fail'] = @datastore['fail'] unless @datastore['fail'].nil?
|
||||
save content
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user