Adding debug modules

git-svn-id: https://beef.googlecode.com/svn/trunk@916 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
wade@bindshell.net
2011-04-21 23:09:40 +00:00
parent 8e033aac83
commit 41289e5f1d
6 changed files with 109 additions and 0 deletions

View 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);
});

View 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"]

View 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

View 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);
});

View 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"]

View 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