def make_head(ea): flags = idc.get_full_flags(ea) if not idc.is_head(flags): # idc.SetFlags(ea, flags | idc.FF_DATA) idc.create_data(ea, idc.FF_BYTE, 1, idc.BADADDR) idaapi.auto_wait() return is_head(ea) return True
def make_head(ea): flags = idc.get_full_flags(ea) if not idc.is_head(flags): # idc.SetFlags(ea, flags | idc.FF_DATA) idc.create_data(ea, idc.FF_BYTE, 1, idc.BADADDR) idaapi.auto_wait() return is_head(ea) return True
def is_head(self): """ Property indicating if the element is an *head* in IDA. An *head* element is the beggining of an element in IDA (such as the beginning of an instruction) and can be named. Wrapper on ``idc.is_head`` . :return: True if the current element is an head, False otherwise. :rtype: bool """ return idc.is_head(self.flags)
def Heads(start=None, end=None): """ Get a list of heads (instructions or data) @param start: start address (default: inf.min_ea) @param end: end address (default: inf.max_ea) @return: list of heads between start and end """ if not start: start = ida_ida.cvar.inf.min_ea if not end: end = ida_ida.cvar.inf.max_ea ea = start if not idc.is_head(ida_bytes.get_flags(ea)): ea = ida_bytes.next_head(ea, end) while ea != ida_idaapi.BADADDR: yield ea ea = ida_bytes.next_head(ea, end)
def is_head(ea): return idc.is_head(idc.get_full_flags(ea))
def is_head(ea): return idc.is_head(idc.get_full_flags(ea))