Пример #1
0
def name(id, string, *suffix):
    '''Set the name of the structure identified by ``id`` to ``string``.'''
    res = (string, ) + suffix
    string = interface.tuplename(*res)

    res = idaapi.validate_name2(buffer(string)[:])
    if string and string != res:
        logging.warn(
            "{:s}.name : Stripping invalid chars from structure name \"{:s}\". : {!r}"
            .format(__name__, string, res))
        string = res
    return idaapi.set_struc_name(id, string)
Пример #2
0
    def name(self, string):
        '''Set the name for the structure to ``string``.'''
        if isinstance(string, tuple):
            string = interface.tuplename(*string)

        res = idaapi.validate_name2(buffer(string)[:])
        if string and string != res:
            logging.warn(
                "{:s}.name : Stripping invalid chars from structure name {!r}. : {!r}"
                .format('.'.join((__name__, self.__class__.__name__)), string,
                        res))
            string = res
        return idaapi.set_struc_name(self.id, string)
Пример #3
0
 def name(self, name):
     return idaapi.set_struc_name(self.id, name)
Пример #4
0
 def name(self, name):
     return idaapi.set_struc_name(self.id, name)
Пример #5
0
 def __call__(self):
     idaapi.set_struc_name(self.sid, self.new_name.encode('utf-8'))
Пример #6
0
def name(id, name=None):
    """set/get the name of a particular structure"""
    if name is None:
        return idaapi.get_struc_name(id)
    return idaapi.set_struc_name(id, name)
Пример #7
0
 def __call__(self):
     idaapi.set_struc_name(self.sid, self.new_name)
Пример #8
0
 def __call__(self):
     idaapi.set_struc_name(idc.get_struc_id(self.oldname.encode('utf-8')),
                           self.newname.encode('utf-8'))