Exemplo n.º 1
0
 def send_names(self):
     qira_names = idaapi.get_nlist_size()
     for i in range(0, qira_names):
         self.cmd = "setname 0x%x %s" % (
             idaapi.get_nlist_ea(i), idaapi.get_nlist_name(i))
         # debugging
         if DEBUG:
             idaapi.msg(
                 "[%s] send_names: EA [0x%x], Name [%s]\n" %
                 (self.wanted_name, idaapi.get_nlist_ea(i),
                  idaapi.get_nlist_name(i),))
         self.ws_send(self.cmd)
Exemplo n.º 2
0
def Names():
    """
    Returns a list of names

    @return: List of tuples (ea, name)
    """
    for i in xrange(idaapi.get_nlist_size()):
        ea = idaapi.get_nlist_ea(i)
        name = idaapi.get_nlist_name(i)
        yield (ea, name)
Exemplo n.º 3
0
def Names():
    """
    Returns a list of names

    @return: List of tuples (ea, name)
    """
    for i in xrange(idaapi.get_nlist_size()):
        ea   = idaapi.get_nlist_ea(i)
        name = idaapi.get_nlist_name(i)
        yield (ea, name)
Exemplo n.º 4
0
  def run(self, arg):
    global qira_address
    idaapi.msg("[QIRA Plugin] Syncing with Qira\n")


    # sync names
    for i in range(idaapi.get_nlist_size()):
      ws_send("setname 0x%x %s" % (idaapi.get_nlist_ea(i), idaapi.get_nlist_name(i)))

    # sync comment
    addr = idaapi.get_segm_base(idaapi.get_first_seg())
    while addr != idaapi.BADADDR:
      for rpt in [True, False]:
        update_comment(addr, rpt)
      addr = idaapi.nextaddr(addr)
Exemplo n.º 5
0
def get_public_decls():
    names = []
    for i in range(idaapi.get_nlist_size()):
        names.append(cpp_interop.declare_public(idaapi.get_nlist_name(i)))

    return "\n".join(names)
Exemplo n.º 6
0
 def name(cls, index):
     '''Return the name at the specified `index`.'''
     return idaapi.get_nlist_name(index)
Exemplo n.º 7
0
 def at(cls, index):
     '''Return the address and the symbol name of the specified `index`.'''
     return idaapi.get_nlist_ea(index), idaapi.get_nlist_name(index)
Exemplo n.º 8
0
 def name(cls, index):
     '''Return the name at the specified `index`.'''
     res = idaapi.get_nlist_name(index)
     return internal.utils.string.of(res)
Exemplo n.º 9
0
 def at(cls, index):
     '''Return the address and the symbol name of the specified `index`.'''
     ea, name = idaapi.get_nlist_ea(index), idaapi.get_nlist_name(index)
     return ea, internal.utils.string.of(name)
Exemplo n.º 10
0
 def name(cls, index):
     return idaapi.get_nlist_name(index)
Exemplo n.º 11
0
 def at(cls, index):
     return idaapi.get_nlist_ea(index), idaapi.get_nlist_name(index)
Exemplo n.º 12
0
def get_public_decls():
    names = []
    for i in range(idaapi.get_nlist_size()):
        names.append(cpp_interop.declare_public(idaapi.get_nlist_name(i)))

    return "\n".join(names)
Exemplo n.º 13
0
 def name(cls, index):
     '''Return the name at the specified `index`.'''
     res = idaapi.get_nlist_name(index)
     return internal.utils.string.of(res)
Exemplo n.º 14
0
 def at(cls, index):
     '''Return the address and the symbol name of the specified `index`.'''
     ea, name = idaapi.get_nlist_ea(index), idaapi.get_nlist_name(index)
     return ea, internal.utils.string.of(name)