Esempio n. 1
0
    def reinitialize(self):
        self.database = Database()
        self.io = IO(self)

        self._pid = 0
        self._package = None
        self._process = None
        self._script = None
        self._spawned = False
        self._resumed = False

        self.java_available = False

        # frida device
        self._device = None

        # process
        self._process = None
        self._script = None

        # breakpoints
        self.breakpoints = {}
        self.java_breakpoints = {}
        self.module_initialization_breakpoints = {}
        self.java_class_initialization_breakpoints = {}

        self.context_tid = 0
Esempio n. 2
0
    def __init__(self, session=None, parent=None, device=None):
        super(Dwarf, self).__init__(parent=parent)
        self._app_window = parent

        self.database = Database()
        self.io = IO(self)

        self.keystone_installed = False
        try:
            import keystone.keystone_const
            self.keystone_installed = True
        except:
            pass

        self.java_available = False

        # frida device
        self._device = device

        # process
        self._pid = 0
        self._package = None
        self._process = None
        self._script = None
        self._spawned = False
        self._resumed = False

        # kernel
        self._kernel = Kernel(self)

        # breakpoints
        self.breakpoints = {}
        self.java_breakpoints = {}
        self.objc_breakpoints = {}
        self.module_initialization_breakpoints = {}
        self.java_class_initialization_breakpoints = {}
        self.watchpoints = {}

        # context
        self._arch = ''
        self._pointer_size = 0
        self.contexts = {}
        self.context_tid = 0
        self._platform = ''

        # connect to self
        self.onApplyContext.connect(self._on_apply_context)
        self.onRequestJsThreadResume.connect(self._on_request_resume_from_js)

        # disassembler
        self.disassembler = Disassembler(self)