这段程序能否从内存里提取需要的数据?(5分)

  • 主题发起人 主题发起人 16cy
  • 开始时间 开始时间
1

16cy

Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm2.Button8Click(Sender: TObject);<br>var<br>vq,totalcommit,paddr:dword;<br>xy:array[0..4] of char;<br>nume:longword;<br>meminfo:_MEMORY_BASIC_INFORMATION;<br>sysinfo:_SYSTEM_INFO;<br>begin<br>totalcommit:=0;<br>paddr:=0;<br>vq:=VirtualQueryEx(pid,@paddr,meminfo,sizeof(meminfo));<br><br>while vq=sizeof(meminfo) do<br>begin<br> &nbsp; if meminfo.state=MEM_COMMIT &nbsp;then<br> &nbsp; &nbsp; &nbsp;begin<br> &nbsp; &nbsp; &nbsp;ReadProcessMemory(pid,meminfo.BaseAddress,@xy,sizeof(xy),nume);<br> &nbsp; &nbsp; &nbsp;vq:=VirtualQueryEx(pid,@paddr,meminfo,sizeof(meminfo));<br> &nbsp; &nbsp; &nbsp;end<br> &nbsp; else<br> &nbsp; &nbsp; &nbsp;begin<br> &nbsp; &nbsp; &nbsp;paddr:=paddr+ mi.RegionSize;<br> &nbsp; &nbsp; &nbsp;vq:=VirtualQueryEx(pid,@paddr,meminfo,sizeof(meminfo));<br> &nbsp; &nbsp; &nbsp;end;<br>end;
 
后退
顶部