| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 437 人关注过本帖
标题:[求助]哪位 查看哪里不同?
只看楼主 加入收藏
Janlex
Rank: 3Rank: 3
等 级:新手上路
威 望:6
帖 子:303
专家分:0
注 册:2006-9-12
收藏
 问题点数:0 回复次数:7 
[求助]哪位 查看哪里不同?

void SearchQQNumber(HANDLE hProcess)
{
SuspendThread(hProcess); //挂载

SYSTEM_INFO info;
GetSystemInfo(&info);

char lpBuffer[4096] = {0};
DWORD yetReadSize = 0;
MEMORY_BASIC_INFORMATION memBasicInfo;

DWORD dwBaseAddress = (DWORD)info.lpMinimumApplicationAddress;

while (dwBaseAddress < (DWORD)info.lpMaximumApplicationAddress)
{
VirtualQueryEx(hProcess, (LPVOID)dwBaseAddress, &memBasicInfo, sizeof(memBasicInfo));
dwBaseAddress = (DWORD)memBasicInfo.BaseAddress + memBasicInfo.RegionSize;

if (memBasicInfo.State != MEM_COMMIT || memBasicInfo.AllocationProtect != PAGE_READWRITE)
{
continue;
}

for (DWORD dw = (DWORD)memBasicInfo.BaseAddress; dw < dwBaseAddress; dw += 4096);
{
if (!ReadProcessMemory(hProcess, (LPCVOID)dw, lpBuffer, 4096, &yetReadSize))
continue;

for (int fin = 0; fin < 4096-8; fin++)
{
if ( !memcmp(&lpBuffer[fin], "MsgEx.db", 8) )
{
char *t=&lpBuffer[fin-10];
lpBuffer[fin-1] = '\0';
printf("%s\n", t);
}
}
}
}
ResumeThread(hProcess);
return;

}

2007-11-02 14:49
Janlex
Rank: 3Rank: 3
等 级:新手上路
威 望:6
帖 子:303
专家分:0
注 册:2006-9-12
收藏
得分:0 

void SeachQQNumber(HANDLE hProcess)
{
SuspendThread(hProcess);

SYSTEM_INFO info;
GetSystemInfo(& info);

char lpBuffer[4096] = { 0 };
DWORD yetReadSize = 0;
MEMORY_BASIC_INFORMATION memBasicInfo;

DWORD dwBaseAddress = (DWORD)info.lpMinimumApplicationAddress;


while (dwBaseAddress < (DWORD)info.lpMaximumApplicationAddress)
{
VirtualQueryEx(hProcess, (LPVOID)dwBaseAddress, &memBasicInfo, sizeof(memBasicInfo));
dwBaseAddress = (DWORD)memBasicInfo.BaseAddress + memBasicInfo.RegionSize;

if (memBasicInfo.State != MEM_COMMIT || memBasicInfo.AllocationProtect != PAGE_READWRITE)
{
continue;
}

for (DWORD dw = (DWORD)memBasicInfo.BaseAddress; dw < dwBaseAddress; dw += 4096 )
{
if( !ReadProcessMemory(hProcess,LPCVOID(dw),lpBuffer, 4096, & yetReadSize))
continue;

for (int fin=0 ;fin <4096 - 8 ;fin++)
{

if (!memcmp( & lpBuffer[fin], "MsgEx.db" , 8 ) )
{
char *t=&lpBuffer[fin-10];
lpBuffer[fin-1] = '\0';
printf("%s\n", t);
}
}
}
}
ResumeThread(hProcess);
return;
}



★★★★★欢迎光临我的博客 ★★★★★
http://www.
2007-11-02 14:50
Janlex
Rank: 3Rank: 3
等 级:新手上路
威 望:6
帖 子:303
专家分:0
注 册:2006-9-12
收藏
得分:0 
谁帮我看下.一楼和二楼贴的代码哪里不同. 我看了半天,眼睛看光了.也没看出来哪点不同

★★★★★欢迎光临我的博客 ★★★★★
http://www.
2007-11-02 14:50
Arcticanimal
Rank: 3Rank: 3
等 级:论坛游民
威 望:7
帖 子:341
专家分:20
注 册:2007-3-17
收藏
得分:0 
老大哦, 函数名错了掉了个r
void SeachQQNumber(HANDLE hProcess)

try new catch
2007-11-02 18:23
Janlex
Rank: 3Rank: 3
等 级:新手上路
威 望:6
帖 子:303
专家分:0
注 册:2006-9-12
收藏
得分:0 

这个我知道.我指除了函数名外


★★★★★欢迎光临我的博客 ★★★★★
http://www.
2007-11-02 19:44
Janlex
Rank: 3Rank: 3
等 级:新手上路
威 望:6
帖 子:303
专家分:0
注 册:2006-9-12
收藏
得分:0 
帮帮我

★★★★★欢迎光临我的博客 ★★★★★
http://www.
2007-11-02 20:18
Arcticanimal
Rank: 3Rank: 3
等 级:论坛游民
威 望:7
帖 子:341
专家分:20
注 册:2007-3-17
收藏
得分:0 

放弃...


try new catch
2007-11-02 20:26
Janlex
Rank: 3Rank: 3
等 级:新手上路
威 望:6
帖 子:303
专家分:0
注 册:2006-9-12
收藏
得分:0 
感谢cctv,感谢mtv,感谢china-V,感谢TVB,感谢所有论坛朋友,bug找到,多了一个';'

★★★★★欢迎光临我的博客 ★★★★★
http://www.
2007-11-03 00:48
快速回复:[求助]哪位 查看哪里不同?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022450 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved