[尝试在python中返回PEB的值时遇到类似的问题,是否无法在python中调用__readgsqword。
def GetPEB():
return ctypes.windll.kernel32.__readgsqword('0x0C',ctypes.sizeof('PVOID'))
AttributeError: function '__readgsqword' not found
这些功能,如文档中所述,是内在功能,不由内核32 dll导出。
您可以通过编译公开这些功能的DLL来调用它们,然后从您的Python代码中调用它们。
但是,使用其他方法可能会更好。例如:How to access the PEB of another process with python ctypes