diff --git a/AhMyth-Server/app/app/assets/js/controllers/AppCtrl.js b/AhMyth-Server/app/app/assets/js/controllers/AppCtrl.js index 559210d0..90bf668f 100644 --- a/AhMyth-Server/app/app/assets/js/controllers/AppCtrl.js +++ b/AhMyth-Server/app/app/assets/js/controllers/AppCtrl.js @@ -100,28 +100,31 @@ app.controller("AppCtrl", ($scope) => { // function to open the dialog and choose apk to be bindded - $appCtrl.BrowseApk = () => { - dialog.showOpenDialog(function(fileNames) { - // fileNames is an array that contains all the selected - if (fileNames === undefined) { + $appCtrl.BrowseApk = () => { + dialog.showOpenDialog({}, { + properties: ['openFile'] + }).then(result => { + if(result.canceled) { $appCtrl.Log("No file selected"); } else { - $appCtrl.Log("File choosen " + fileNames[0]); - readFile(fileNames[0]); // read the file + $appCtrl.Log("File choosen " + result.filePaths[0]); + readFile(result.filePaths[0]); } - }); + }).catch(() => { + $appCtrl.Log("No file selected"); + }) function readFile(filepath) { $appCtrl.filePath = filepath; $appCtrl.$apply(); } - } + // function to build the apk and sign it $appCtrl.GenerateApk = (apkFolder) => { @@ -418,4 +421,4 @@ function GetLanucherPath(manifest, smaliPath) { -} \ No newline at end of file +} diff --git a/README.md b/README.md index f6500c59..627c6d51 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,12 @@ It consists of two parts : #### 1) From source code ###### Prerequisite : * Electron (to start the app) -* Java (to generate apk backdoor) +* Openjdk-8-jdk/Java (to generate apk backdoor) * Electron-builder and electron-packer (to build binaries for (OSX,WINDOWS,LINUX)) 1. ```git clone https://github.com/AhMyth/AhMyth-Android-RAT.git``` 2. ```cd AhMyth-Android-RAT/AhMyth-Server``` -3. ```npm start``` +3. ```npm install && npm audit fix``` +4. ```npm start``` #### 2) From binaries ###### Prerequisite :