예제 #1
0
파일: calls.py 프로젝트: jjo-sec/idataco
 def removeMarkup(self, ea, force=False):
     if ea in self._marked_up or force:
         log.debug("Removing color")
         idc.SetColor(ea, idc.CIC_FUNC, 0xffffff)
         idc.SetColor(ea, idc.CIC_ITEM, 0xffffff)
         idc.MakeComm(ea, "")
         log.debug("Removing posterior lines")
         i = 0
         while idc.LineB(ea, i):
             idc.DelExtLnB(ea, i)
             i += 1
예제 #2
0
    def cmt_changed(self, ea, repeatable):
        self.pre_hook()

        if LOG_IDB_EVENTS:
            self.debug_event("cmt_changed     (0x%.016X, %x)" % (ea, repeatable))

        hooks.ida.comment_changed(ea)
        if (idc.LineA(ea, 0) is None) and (idc.LineB(ea, 0) is None):
            return idaapi.IDB_Hooks.cmt_changed(self, ea, repeatable)

        return 0
예제 #3
0
 def yacheck_data_comments(self):
     eas = yaunit.load('data_comments')
     i = 0
     for offset in range(0, 3):
         for cmt, rpt, post, ant in tests_data:
             ea = eas[i]
             logger.debug(
                 "checking data comment at 0x%08X : %r, %r, %r, %r" %
                 (ea, cmt, rpt, post, ant))
             i += 1
             if cmt != None:
                 self.assertEqual(idc.GetCommentEx(ea, False), cmt)
             if rpt != None:
                 self.assertEqual(idc.GetCommentEx(ea, True), rpt)
             if post != None:
                 for j, txt in enumerate(post.split('\n')):
                     self.assertEqual(idc.LineB(ea, j), txt)
             if ant != None:
                 for j, txt in enumerate(ant.split('\n')):
                     self.assertEqual(idc.LineA(ea, j), txt)
예제 #4
0
 def posterior(self):
     """Posterior Comment"""
     lines = (idc.LineB(self._ea, index) for index in count())
     return "\n".join(iter(lines.next, None))