Add ARE return status
This commit is contained in:
@@ -13,7 +13,7 @@ beef.execute(function() {
|
||||
var wait = 2;
|
||||
|
||||
if(!beef.browser.hasCors()) {
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=Browser does not support CORS');
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=Browser does not support CORS', beef.are.status_error());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ beef.execute(function() {
|
||||
// set target IP range
|
||||
var range = ipRange.match('^([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\-([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))$');
|
||||
if (range == null || range[1] == null) {
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=malformed IP range supplied");
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=malformed IP range supplied", beef.are.status_error());
|
||||
return;
|
||||
}
|
||||
// ipRange will be in the form of 192.168.0.1-192.168.0.254
|
||||
|
||||
@@ -8,7 +8,7 @@ beef.execute(function() {
|
||||
|
||||
if(beef.browser.isO()) {
|
||||
beef.debug("[command #<%= @command_id %>] Browser is not supported.");
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=unsupported browser");
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=unsupported browser", beef.are.status_error());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ beef.execute(function() {
|
||||
// set target IP range
|
||||
var range = ipRange.match('^([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\-([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))$');
|
||||
if (range == null || range[1] == null) {
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=malformed IP range supplied");
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=malformed IP range supplied", beef.are.status_error());
|
||||
return;
|
||||
}
|
||||
// ipRange will be in the form of 192.168.0.1-192.168.0.254
|
||||
|
||||
@@ -8,7 +8,7 @@ beef.execute(function() {
|
||||
|
||||
if(!beef.browser.isFF() && !beef.browser.isC()){
|
||||
beef.debug("[command #<%= @command_id %>] Browser is not supported.");
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=unsupported browser");
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=unsupported browser", beef.are.status_error());
|
||||
}
|
||||
|
||||
var min_timeout = 500;
|
||||
@@ -105,7 +105,7 @@ var doScan = function(timeout) {
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=unexpected results&hosts="+hosts);
|
||||
}
|
||||
} else if (discovered_hosts.length == 0) {
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=no results");
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=no results", beef.are.status_error());
|
||||
} else {
|
||||
beef.debug("[command #<%= @command_id %>] Identifying LAN hosts completed.");
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'hosts='+hosts);
|
||||
|
||||
@@ -42,7 +42,7 @@ beef.execute(function() {
|
||||
// set target IP range
|
||||
var range = ipRange.match('^([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\-([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))$');
|
||||
if (range == null || range[1] == null) {
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=malformed IP range supplied");
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=malformed IP range supplied", beef.are.status_error());
|
||||
return;
|
||||
}
|
||||
// ipRange will be in the form of 192.168.0.1-192.168.0.254
|
||||
|
||||
@@ -9,7 +9,7 @@ beef.execute(function() {
|
||||
|
||||
if(!beef.browser.isFF() && !beef.browser.isS()){
|
||||
beef.debug("[command #<%= @command_id %>] Browser is not supported.");
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=unsupported browser");
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=unsupported browser", beef.are.status_error());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user