示例#1
0
def _prepare_guid(op, prefix):
    if op.type == o_mem:
        guid_ptr = Pointer(op.value)
        if guid_ptr.type != "EFI_GUID" or not is_uname(
                guid_ptr.name) or guid_ptr.name in ["Protocol", "HandlerType"]:
            guid_data1 = str("%.8x" % get_wide_dword(op.value)).upper()
            guid_ptr.name = "%s_PROTOCOL_%s_GUID" % (prefix, guid_data1)
    else:
        print("Do not know how to extract GUID ptr from %s at 0x%X" %
              (op, op.ea))
        return

    return GUID(ptr=guid_ptr)
示例#2
0
 def _data(cls, offset):
     name = idc.Name(offset)
     if ida_name.is_uname(name):
         return hashlib.md5(name).hexdigest()
     return None
示例#3
0
 def _data(cls, offset):
     name = ida_name.get_name(offset)
     if ida_name.is_uname(name):
         # TODO: get flags here
         return {'name': name}
     return None
示例#4
0
文件: name.py 项目: gitmesam/rematch
 def data(self):
     name = ida_name.get_name(self.offset)
     if ida_name.is_uname(name):
         # TODO: get flags here
         return {'name': name, 'flags': 0}
     return None
示例#5
0
    def data(self):
        name = idc.Name(self.offset)
        if ida_name.is_uname(name):
            return None

        return hashlib.md5(name).hexdigest()
示例#6
0
def _is_uname(name):
    return is_uname(name) and name not in (
        'class',
        'new',
    )