diff --git a/modules/debug/test_return_ascii_chars/command.js b/modules/debug/test_return_ascii_chars/command.js new file mode 100644 index 000000000..3a776b87b --- /dev/null +++ b/modules/debug/test_return_ascii_chars/command.js @@ -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); + +}); + diff --git a/modules/debug/test_return_ascii_chars/config.yaml b/modules/debug/test_return_ascii_chars/config.yaml new file mode 100644 index 000000000..570e58361 --- /dev/null +++ b/modules/debug/test_return_ascii_chars/config.yaml @@ -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"] diff --git a/modules/debug/test_return_ascii_chars/module.rb b/modules/debug/test_return_ascii_chars/module.rb new file mode 100644 index 000000000..ec096c760 --- /dev/null +++ b/modules/debug/test_return_ascii_chars/module.rb @@ -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 diff --git a/modules/debug/test_return_long_string/command.js b/modules/debug/test_return_long_string/command.js new file mode 100644 index 000000000..2f2f05156 --- /dev/null +++ b/modules/debug/test_return_long_string/command.js @@ -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); + +}); + diff --git a/modules/debug/test_return_long_string/config.yaml b/modules/debug/test_return_long_string/config.yaml new file mode 100644 index 000000000..d8aa2bcb7 --- /dev/null +++ b/modules/debug/test_return_long_string/config.yaml @@ -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"] diff --git a/modules/debug/test_return_long_string/module.rb b/modules/debug/test_return_long_string/module.rb new file mode 100644 index 000000000..cf1e62da5 --- /dev/null +++ b/modules/debug/test_return_long_string/module.rb @@ -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