没有合适的资源?快使用搜索试试~ 我知道了~
读写进程的关键代码,希望对某些朋友有用。
资源推荐
资源详情
资源评论
OSVERSIONINFO vi = { sizeof(vi) };
DWORD dwBase;
DWORD QueryAddr;
DWORD sai_res;
::GetVersionEx(&vi);
if (vi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
dwBase = 4*1024*1024;
else
dwBase = 640*1024;
MEMORY_BASIC_INFORMATION mbi;
for (;dwBase<2*1024*1024*1024;)
{
VirtualQueryEx(saihnd, (LPCVOID)dwBase,&mbi,sizeof(mbi));
QueryAddr=dwBase;
//if (mbi.State == MEM_COMMIT)
if (mbi.Type == MEM_PRIVATE && mbi.AllocationProtect == PAGE_READWRITE)
{
for (int t=0;t<(int)mbi.RegionSize-3;t++)
{
ReadProcessMemory(saihnd, (LPVOID)(QueryAddr+t), &sai_res, 4, NULL);
if (sai_res == dwValue)
{
if(::WriteProcessMemory(saihnd, (LPVOID)(QueryAddr+t), &sss, 4, NULL))
{
cout<<"¸Äд³É¹¦!"<<endl;
stuas=1;
}
}
DWORD dwBase;
DWORD QueryAddr;
DWORD sai_res;
::GetVersionEx(&vi);
if (vi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
dwBase = 4*1024*1024;
else
dwBase = 640*1024;
MEMORY_BASIC_INFORMATION mbi;
for (;dwBase<2*1024*1024*1024;)
{
VirtualQueryEx(saihnd, (LPCVOID)dwBase,&mbi,sizeof(mbi));
QueryAddr=dwBase;
//if (mbi.State == MEM_COMMIT)
if (mbi.Type == MEM_PRIVATE && mbi.AllocationProtect == PAGE_READWRITE)
{
for (int t=0;t<(int)mbi.RegionSize-3;t++)
{
ReadProcessMemory(saihnd, (LPVOID)(QueryAddr+t), &sai_res, 4, NULL);
if (sai_res == dwValue)
{
if(::WriteProcessMemory(saihnd, (LPVOID)(QueryAddr+t), &sss, 4, NULL))
{
cout<<"¸Äд³É¹¦!"<<endl;
stuas=1;
}
}
资源评论
whitebush01
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功