Adding debug modules
git-svn-id: https://beef.googlecode.com/svn/trunk@916 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
10
modules/debug/test_return_ascii_chars/command.js
Normal file
10
modules/debug/test_return_ascii_chars/command.js
Normal file
@@ -0,0 +1,10 @@
|
||||
beef.execute(function() {
|
||||
|
||||
var str = '';
|
||||
for (var i=32; i<=127;i++) str += String.fromCharCode(i);
|
||||
|
||||
console.log(str);
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, str);
|
||||
|
||||
});
|
||||
|
||||
10
modules/debug/test_return_ascii_chars/config.yaml
Normal file
10
modules/debug/test_return_ascii_chars/config.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
beef:
|
||||
module:
|
||||
Test_return_ascii_chars:
|
||||
enable: true
|
||||
category: "Debug"
|
||||
name: "Return Ascii Chars"
|
||||
description: "This module will return the set of ascii chars."
|
||||
authors: ["wade"]
|
||||
target:
|
||||
working: ["ALL"]
|
||||
32
modules/debug/test_return_ascii_chars/module.rb
Normal file
32
modules/debug/test_return_ascii_chars/module.rb
Normal file
@@ -0,0 +1,32 @@
|
||||
class Test_return_ascii_chars < BeEF::Core::Command
|
||||
|
||||
def initialize
|
||||
super({
|
||||
'Name' => 'Return Ascii Chars',
|
||||
'Description' => %Q{
|
||||
This module will return the set of ascii chars.
|
||||
},
|
||||
'Category' => 'Debug',
|
||||
'Data' => [
|
||||
# {'name' => 'repeat', 'ui_label' => 'Times to repeat', 'value' =>'1024'},
|
||||
# {'name' => 'repeat_string', 'ui_label' => 'String to repeat', 'value' =>'\u00AE'}
|
||||
],
|
||||
'Author' => ['wade'],
|
||||
'File' => __FILE__
|
||||
})
|
||||
|
||||
set_target({
|
||||
'verified_status' => VERIFIED_WORKING,
|
||||
'browser_name' => ALL
|
||||
})
|
||||
|
||||
use_template!
|
||||
end
|
||||
|
||||
def callback
|
||||
content = {}
|
||||
content['Result String'] = @datastore['result_string']
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
15
modules/debug/test_return_long_string/command.js
Normal file
15
modules/debug/test_return_long_string/command.js
Normal file
@@ -0,0 +1,15 @@
|
||||
beef.execute(function() {
|
||||
|
||||
var repeat_value = "<%= @repeat_string %>";
|
||||
var iterations = <%= @repeat %>;
|
||||
var str = "";
|
||||
|
||||
for (var i = 0; i < iterations; i++) {
|
||||
str += repeat_value;
|
||||
}
|
||||
|
||||
console.log(str);
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, str);
|
||||
|
||||
});
|
||||
|
||||
10
modules/debug/test_return_long_string/config.yaml
Normal file
10
modules/debug/test_return_long_string/config.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
beef:
|
||||
module:
|
||||
Test_return_long_string:
|
||||
enable: true
|
||||
category: "Debug"
|
||||
name: "Test Returning Results"
|
||||
description: "This module will return a string of the specified length."
|
||||
authors: ["wade"]
|
||||
target:
|
||||
working: ["ALL"]
|
||||
32
modules/debug/test_return_long_string/module.rb
Normal file
32
modules/debug/test_return_long_string/module.rb
Normal file
@@ -0,0 +1,32 @@
|
||||
class Test_return_long_string < BeEF::Core::Command
|
||||
|
||||
def initialize
|
||||
super({
|
||||
'Name' => 'Return Long String',
|
||||
'Description' => %Q{
|
||||
This module will return a string of the specified length.
|
||||
},
|
||||
'Category' => 'Debug',
|
||||
'Data' => [
|
||||
{'name' => 'repeat', 'ui_label' => 'Times to repeat', 'value' =>'1024'},
|
||||
{'name' => 'repeat_string', 'ui_label' => 'String to repeat', 'value' =>'\u00AE'}
|
||||
],
|
||||
'Author' => ['wade'],
|
||||
'File' => __FILE__
|
||||
})
|
||||
|
||||
set_target({
|
||||
'verified_status' => VERIFIED_WORKING,
|
||||
'browser_name' => ALL
|
||||
})
|
||||
|
||||
use_template!
|
||||
end
|
||||
|
||||
def callback
|
||||
content = {}
|
||||
content['Result String'] = @datastore['result_string']
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user