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)
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)
def setComment(ea, string, repeatable=1): fn = byAddress(ea) return idaapi.set_func_cmt(fn, string, repeatable)
def repeat(self, comment): idaapi.set_func_cmt(self._function._func, comment, True)
def regular(self, comment): idaapi.set_func_cmt(self._function._func, comment, False)
def setComment(self, cmt): # type: (str) -> () """ :param cmt: Comment to be set as a function comment """ idaapi.set_func_cmt(self.func, cmt, 1)