Exemplo n.º 1
0
    def LoadBreakPoints(self, breakpoint_db, record_db=''):
        self.BreakPointsDB=Breakpoints.DB(breakpoint_db)
        self.BreakPointsDB.Load()
        self.RecordsDB=Breakpoints.Record(record_db)
        self.BreakpointsMap={}
        for (module, rules) in self.BreakPointsDB.AddressBreakpoints.items():
            for (address, dump_targets) in rules.items():
                bp=self.SetBp(address,self.HandleBreakpoint)
                
                self.logger.debug('Setting breakpoint on %s (%.8x) - %d' % (
                                                module,
                                                address,
                                                bp.getId()
                                            )
                                        )

                self.BreakpointsMap[address]={
                                    'Type': 'Address',
                                    'Module': module,
                                    'RVA': 0,
                                    'Symbol': '',
                                    'DumpTargets': dump_targets
                                }
            
        for (module_name, module_bps) in self.BreakPointsDB.ModuleBreakpoints.items():
            self.AddModuleBP(module_name,module_bps,self.HandleBreakpoint)

        for (module_name, module_bps) in self.BreakPointsDB.SymbolBreakpoints.items():
            for (symbol, dump_targets) in module_bps.items():
                self.AddSymbolBP(module_name,symbol,dump_targets,self.HandleBreakpoint)
                
        self.ReturnBreakpointsMap={}
Exemplo n.º 2
0
    def __init__(self,breakpoint_db):
        eventHandler.__init__(self)

        self.logger=logging.getLogger(__name__)
        
        breakpoints_db=Breakpoints.DB(breakpoint_db)
        breakpoints_db.Load()
        self.BreakpointsMap={}
        self.SetBP(breakpoints_db.Breakpoints)
Exemplo n.º 3
0
import Breakpoints

if __name__ == '__main__':
    breakpoints = Breakpoints.Util()
    breakpoints.AddFunctions()
    breakpoints.Add("All", "DisplacementCall")
    breakpoints.Add("All", "Pointer")
    breakpoints.Add("All", "IndirectCall")
    breakpoints.Save()
    breakpoints.Exit()