Exemple #1
0
 def __init__(self, bv, function=None):
     BackgroundTaskThread.__init__(self, "Finding IOCTLs", can_cancel=True)
     self.bv = bv
     if function:
         self.function = function.start
     else:
         self.function = None
Exemple #2
0
 def __init__(self, bv, options):
     global task
     BackgroundTaskThread.__init__(self, 'Exporting data from BN', False)
     self.json_file = options.json_file
     self.options = options
     self.bv = bv
     task = self
Exemple #3
0
 def __init__(self, bv: BinaryView, tag_type: Tag, delphi_version: int):
     BackgroundTaskThread.__init__(self,
                                   'Searching for VMTs...',
                                   can_cancel=True)
     self._bv = bv
     self._tag_type = tag_type
     self._delphi_version = delphi_version
Exemple #4
0
 def __init__(self, bv, options):
     global task
     BackgroundTaskThread.__init__(
         self, 'Importing data from bnida JSON file', False)
     self.json_file = options.json_file
     self.bv = bv
     self.options = options
Exemple #5
0
 def __init__(self, target, cancel_cb=None, *args, **kwargs):
     BackgroundTaskThread.__init__(self, '', cancel_cb is not None)
     self.target = target
     self.args = args
     self.kwargs = kwargs
     self.cancel_cb = cancel_cb
     return
Exemple #6
0
 def __init__(self, bv):
     BackgroundTaskThread.__init__(self, "", True)
     self.progress = 'genesis: Fixing up ROM checksum...'
     self.rom_start = 0x200
     self.checksum_off = 0x18e
     self.bv = bv
     self.br = BinaryReader(self.bv)
 def __init__(
     self, bv: BinaryView, instruction: MediumLevelILInstruction, function: Function
 ):
     BackgroundTaskThread.__init__(
         self, "Deoptmizing Operations - Instruction", True
     )
     self.bv = bv
     self.instruction = instruction
     self.function = function
Exemple #8
0
 def __init__(self, bv: BinaryView, tag_type: Tag, delphi_version: int,
              offset_ptr_size: int, start: int, end: int):
     BackgroundTaskThread.__init__(self,
                                   'Searching for VMTs...',
                                   can_cancel=True)
     self._bv = bv
     self._tag_type = tag_type
     self._delphi_version = delphi_version
     self._offset_ptr_size = offset_ptr_size
     self._search_start = start
     self._search_end = end
Exemple #9
0
    def __init__(self, function: Function, start: int):
        BNILVisitor.__init__(self)
        BackgroundTaskThread.__init__(self, f"Deobfuscating {start:x}", True)
        self._start: int = start
        self.function: Function = function
        self.view: BinaryView = function.view
        self.address_size = self.view.arch.address_size
        self.target_queue = TargetQueue()
        self.exception_visitors = {
            f.start: ExceptionVisitor(self)
            for f in self.view.functions
        }
        self.seen = {}
        self.prev_phase = 1
        self.num_phases = 3
        self.phase = 1

        self.target_queue.put(start)
Exemple #10
0
    def __init__(self, bv, filepath=None, directories=None):
        self.progress_banner = "Running YARA scan"
        BackgroundTaskThread.__init__(self, self.progress_banner, True)

        self.bv = bv
        self.reader = BinaryReader(self.bv)
        self.rules = []
        self.results = []

        # Ensure that the tag types exist before using it
        if "YARA Matches" not in bv.tag_types:
            bv.create_tag_type("YARA Matches", "🔎")

        if filepath:
            self.load_signature(filepath)

        if directories:
            self.load_signatures(directories)
 def __init__(self, bv: BinaryView, function: Function):
     BackgroundTaskThread.__init__(self, "Deoptimizing Operations - Function", True)
     self.bv = bv
     self.function = function
Exemple #12
0
 def __init__(self, msg, bw, callback, pars):
     BackgroundTaskThread.__init__(self, msg, False)
     self.bw = bw
     self.pars = pars
     self.callback = callback
 def __init__(self, func, *args):
     BackgroundTaskThread.__init__(self,
                                   f"Running {func.__name__}",
                                   can_cancel=True)
     self.func = func
     self.args = args
Exemple #14
0
 def __init__(self):
     BackgroundTaskThread.__init__(self, "Running Discord Rich Presence", True)
     
     self.loop = asyncio.new_event_loop()
     self.rpc = presence.Presence(client_id=DiscordRichPresence.client_id, loop=self.loop)
     self.active = True
Exemple #15
0
 def __init__(self, bv):
     BackgroundTaskThread.__init__(self, "", True)
     self.progress = 'genesis: Enumerating call tables...'
     self.bv = bv
     self.br = BinaryReader(self.bv)
Exemple #16
0
 def __init__(self, bv: BinaryView):
     BackgroundTaskThread.__init__(self, '', False)
     self.bv = bv
     self.br = BinaryReader(self.bv)
     self.dirname = os.path.dirname(os.path.abspath(__file__))
     self.guids = self._load_guids()
Exemple #17
0
 def __init__(self, status, view, function):
     BackgroundTaskThread.__init__(self, status, False)
     self.view = view
     self.function = function
Exemple #18
0
 def __init__(self, view: BinaryView) -> None:
     BackgroundTaskThread.__init__(self, '', True)
     self.view = view
     self.file = None
     self.progress = ''
Exemple #19
0
 def __init__(self, view, tv):
     self.tv = tv
     self.view = view
     BackgroundTaskThread.__init__(self, "Calculating Coverage", True)
Exemple #20
0
 def __init__(self, msg, func, *args, **kwargs):
         BackgroundTaskThread.__init__(self, msg, True)
         self.func = func
         self.args = args
         self.kwargs = kwargs
Exemple #21
0
 def __init__(self, bv):
     BackgroundTaskThread.__init__(self,
                                   "Labeling Driver Dispatch Routines",
                                   can_cancel=True)
     self.bv = bv
Exemple #22
0
 def __init__(self, bv):
     BackgroundTaskThread.__init__(self,
                                   "Labeling Callback Routines",
                                   can_cancel=True)
     self.bv = bv
Exemple #23
0
 def __init__(self, bv, msg, callback):
     BackgroundTaskThread.__init__(self, msg, False)
     self.bv = bv
     self.callback = callback
     self._i = 0
Exemple #24
0
 def __init__(self, bv):
     BackgroundTaskThread.__init__(self, "", True)
     self.bv = bv
     self.as_path = '/usr/bin/m68k-linux-gnu-as'
     self.ld_path = '/usr/bin/m68k-linux-gnu-ld'
     self.progress = 'genesis: Assembling code...'