コード例 #1
0
 def update_proc_list(self, device):
     self.proc_list.clear()
     try:
         procs = device.enumerate_processes()
     except:
         return
     for proc in procs:
         q = AndroidPackageWidget('%s\t%s' % (proc.pid, proc.name), '', proc.pid)
         self.proc_list.addItem(q)
コード例 #2
0
 def build_packages_list(self, list, data):
     list.setMinimumWidth(
         int(self.app_window.get_app_instance().width() / 4))
     for ap in sorted(data, key=lambda x: x.package):
         list.addItem(
             AndroidPackageWidget(ap.package,
                                  ap.package,
                                  0,
                                  apk_path=ap.path))
コード例 #3
0
ファイル: ui_welcome.py プロジェクト: ashr/Dwarf
    def run(self):
        self.clear_procs.emit()

        if self.device is not None:
            try:
                procs = self.device.enumerate_processes()

                for proc in procs:
                    proc_item = AndroidPackageWidget('%s\t%s' % (proc.pid, proc.name), '', proc.pid)
                    self.add_proc.emit(proc_item)
            # ServerNotRunningError('unable to connect to remote frida-server: closed')
            except frida.ServerNotRunningError:
                self.is_error.emit('unable to connect to remote frida server: not started')
            except frida.TransportError:
                self.is_error.emit('unable to connect to remote frida server: closed')
            except frida.TimedOutError:
                self.is_error.emit('unable to connect to remote frida server: timedout')
            except Exception:
                self.is_error.emit('something was wrong...')

        self.device = None
コード例 #4
0
 def update_spawn_list(self, device):
     self.spawn_list.clear()
     try:
         apps = device.enumerate_applications()
     except:
         return
     last_letter = ''
     for app in sorted(apps, key=lambda x: x.name):
         app_name = app.name
         l = app.name[0].upper()
         if last_letter != l:
             if last_letter != '':
                 q = NotEditableListWidgetItem('')
                 q.setFlags(Qt.NoItemFlags)
                 self.spawn_list.addItem(q)
             last_letter = l
             q = NotEditableListWidgetItem(last_letter)
             q.setFlags(Qt.NoItemFlags)
             self.spawn_list.addItem(q)
         q = AndroidPackageWidget(app_name, app.identifier, 0)
         self.spawn_list.addItem(q)
コード例 #5
0
ファイル: ui_welcome.py プロジェクト: ashr/Dwarf
    def run(self):

        self.clear_spawns.emit()

        if self.device is not None:
            try:
                apps = self.device.enumerate_applications()

                last_letter = ''

                for app in sorted(apps, key=lambda x: x.name):
                    app_name = app.name
                    letter = app.name[0].upper()

                    if last_letter != letter:
                        if last_letter != '':
                            item = NotEditableListWidgetItem('')
                            item.setFlags(Qt.NoItemFlags)
                            self.add_spawn.emit(item)

                        last_letter = letter
                        item = NotEditableListWidgetItem(last_letter)
                        item.setFlags(Qt.NoItemFlags)
                        self.add_spawn.emit(item)

                    item = AndroidPackageWidget(app_name, app.identifier, 0)
                    self.add_spawn.emit(item)
            except frida.ServerNotRunningError:
                self.is_error.emit('unable to connect to remote frida server: not started')
            except frida.TransportError:
                self.is_error.emit('unable to connect to remote frida server: closed')
            except frida.TimedOutError:
                self.is_error.emit('unable to connect to remote frida server: timedout')
            except Exception:
                self.is_error.emit('something was wrong...')

        self.device = None
コード例 #6
0
ファイル: menu_bar.py プロジェクト: hexploitable/Dwarf
 def build_packages_list(self, list, data):
     list.setMinimumWidth(
         int(self.app_window.get_app_instance().width() / 4))
     for ap in sorted(data, key=lambda x: x.package):
         list.addItem(AndroidPackageWidget(ap['name'], ap['identifier'], 0))