Add wait option to CORS scanner

This commit is contained in:
Brendan Coles
2016-04-04 10:02:49 +00:00
parent 3bcf1b66cd
commit 7b96212876
3 changed files with 8 additions and 6 deletions

View File

@@ -16,7 +16,8 @@
"options": {
"ipRange":"<<mod_input>>",
"ports":"80,8080",
"threads":"3",
"threads":"2",
"wait":"2",
"timeout":"10"
}
}

View File

@@ -9,9 +9,9 @@ beef.execute(function() {
var ips = new Array();
var ipRange = "<%= @ipRange %>";
var ports = "<%= @ports %>";
var threads = "<%= @threads %>";
var timeout = <%= @timeout %>*1000;
var wait = 2;
var threads = parseInt("<%= @threads %>", 10);
var timeout = parseInt("<%= @timeout %>", 10)*1000;
var wait = parseInt("<%= @wait %>", 10)*1000;
if(!beef.browser.hasCors()) {
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=Browser does not support CORS', beef.are.status_error());
@@ -96,7 +96,7 @@ beef.execute(function() {
// create worker queue
var workers = new Array();
for (w=0; w < threads; w++) {
workers.push(new WorkerQueue(wait*1000));
workers.push(new WorkerQueue(wait));
}
// send CORS request to each IP

View File

@@ -34,7 +34,8 @@ class Cross_origin_scanner_cors < BeEF::Core::Command
return [
{'name' => 'ipRange', 'ui_label' => 'Scan IP range (C class)', 'value' => '192.168.0.1-192.168.0.254'},
{'name' => 'ports', 'ui_label' => 'Ports', 'value' => '80,8080'},
{'name' => 'threads', 'ui_label' => 'Workers', 'value' => '3'},
{'name' => 'threads', 'ui_label' => 'Workers', 'value' => '2'},
{'name' => 'wait', 'ui_label' => 'Wait (s) between each request for each worker', 'value' => '2'},
{'name' => 'timeout', 'ui_label' => 'Timeout for each request (s)', 'value' => '10'}
]
end