示例#1
0
    def req_fcmt(self, hash):
        msg, offset, base = hash["msg"], hash["offset"], hash["base"]
        offset, msg = self.addr_switch(offset, msg)
        if not offset:
            return

        ea = self.rebase(base, offset)
        if not ea:
            return

        func = idaapi.get_func(ea)
        if not func:
            print ("[*] could not find func for 0x%x" % ea)
            return

        idaapi.set_func_cmt(func, str(msg), False)
        print ("[*] function comment added at 0x%x" % ea)
示例#2
0
def comment(fn, comment=None, repeatable=1):
    fn = by(fn)
    if comment is None:
        return idaapi.get_func_cmt(fn, repeatable)
    return idaapi.set_func_cmt(fn, comment, repeatable)
示例#3
0
 def setComment(ea, string, repeatable=1):
     fn = byAddress(ea)
     return idaapi.set_func_cmt(fn, string, repeatable)
示例#4
0
 def repeat(self, comment):
     idaapi.set_func_cmt(self._function._func, comment, True)
示例#5
0
 def regular(self, comment):
     idaapi.set_func_cmt(self._function._func, comment, False)
示例#6
0
 def repeat(self, comment):
     idaapi.set_func_cmt(self._function._func, comment, True)
示例#7
0
 def regular(self, comment):
     idaapi.set_func_cmt(self._function._func, comment, False)
示例#8
0
 def setComment(self, cmt):
     # type: (str) -> ()
     """
     :param cmt: Comment to be set as a function comment
     """
     idaapi.set_func_cmt(self.func, cmt, 1)