IDAPYTHON 从内存中获取了错误的数据

IDAPYTHON got wrong data from memory

我写了一个脚本来显示 NtQueryInformationProcess 的第二个参数。但是,我总是得到错误的数据,好像内存没有刷新,我得到的是旧的 data.Here 是我的代码:

from idaapi import *
NtQueryInformationProcess=0x7798E740
class HookNQIP(DBG_Hooks):
    def dbg_bpt(self,tid,ea):
        if ea==NtQueryInformationProcess:
            print 'ProcessInformationClass:',hex(Dword(GetRegValue('ESP')+8))
AddBpt(NtQueryInformationProcess)
func=HookNQIP()
func.hook()

Win10-64 上的 IDA 6.9,thx

问这个问题是我的错,而这里是答案:

所以解决方案是将代码 RefreshDebuggerMemory() 添加到新鲜内存中

事实上我在idapython的文档中搜索了单词'fresh',但是那个页面上的东西太多所以我什么都没有因为我在所有东西加载之前关闭了那个页面,那真的一个错误。