def NotTails(*args): """ Enumerate array items @param <range>: see getrange @return: list of all not-tails Note that NotTails includes all Heads plus all undefined bytes """ (first, last) = getrange(args) ea = first if ea < last and idaapi.isTail(idaapi.getFlags(ea)): ea = idaapi.next_not_tail(ea) while ea != BADADDR and ea < last: yield ea ea = idaapi.next_not_tail(ea)
def NotTails(*args): """ Enumerate array items @param <range>: see getrange @return: list of all not-tails Note that NotTails includes all Heads plus all undefined bytes """ (first, last)= getrange(args) ea= first if ea<last and idaapi.isTail(idaapi.getFlags(ea)): ea= idaapi.next_not_tail(ea) while ea!=BADADDR and ea<last: yield ea ea= idaapi.next_not_tail(ea)
def run(self, arg): idaapi.msg("[%s] Syncing with WS Server\n" % (self.wanted_name,)) self.addr = idaapi.get_screen_ea() if self.old_addr != self.addr: # check against idc.BADADDR and None before going if (self.addr is not None) and (self.addr != idc.BADADDR): # Code Address if idaapi.isCode(idaapi.getFlags(self.addr)): # don't set the address if it's already the qira_address if self.addr != self.qira_address: # debugging if DEBUG: idaapi.msg( "[%s] Qira Address 0x%x \n" % (self.wanted_name, self.addr,)) # Instruction Address self.set_qira_address(self.addr) self.update_address("iaddr", self.addr) # Data Address elif idaapi.isData(idaapi.getFlags(self.addr)): self.update_address("daddr", self.addr) # Tail Address elif idaapi.isTail(idaapi.getFlags(self.addr)): self.update_address("taddr", self.addr) # Unknown Address elif idaapi.isUnknown(idaapi.getFlags(self.addr)): self.update_address("uaddr", self.addr) # Head Address elif idaapi.isHead(idaapi.getFlags(self.addr)): self.update_address("haddr", self.addr) # Flow Address elif idaapi.isFlow(idaapi.getFlags(self.addr)): self.update_address("faddr", self.addr) # Var Address elif idaapi.isVar(idaapi.getFlags(self.addr)): self.update_address("vaddr", self.addr) # Data Address else: self.update_address("daddr", self.addr) self.old_addr = self.addr
def is_tail(self): """Is the line a tail.""" return idaapi.isTail(self.flags)
def is_tail(self): """Is the location a tail.""" return idaapi.isTail(self.flags)