|
|
|
ReadProcessMemory读取失败
我在XP上也调试成功了 估计win7里的扫雷雷区的地址变了 |
|
ReadProcessMemory读取失败
我用getlasterror查看了下 错误代码是299 代表"仅完成部分的 ReadProcessMemoty 或 WriteProcessMemory 请求" 这个该怎么解决? |
|
ReadProcessMemory读取失败
我用getlasterror看看吧 win7里不至于把扫雷还重写吧 |
|
ReadProcessMemory读取失败
[QUOTE=CamelLu;722062]这个例子貌似并不需要提权 本来想拷贝楼主的代码编译调试,无奈楼主你的代码实在看不懂 下面是我的,测试成功 代码一复制到论坛就乱了,附件里面有源文件 XP sp2&VC++6.0[/QUOTE] 您的程序在我这也是读不出来 http://bbs.pediy.com/attachment.php?attachmentid=35499&stc=1&d=1259939716 |
|
ReadProcessMemory读取失败
介似怎么回事 我的是win7 |
|
ReadProcessMemory读取失败
另: addr[5]是一个字节,i不就是1吗,我是要获得整个长度啊 先DUBUG提权 提权以后还是读不出来 这是我的提权代码 HANDLE Getpid(){ DWORD pid; HWND hwnd=FindWindow(NULL,"扫雷"); //获取扫雷窗口句柄 HANDLE hToken; //访问令牌指针 TOKEN_PRIVILEGES Privileges; LUID luid; Privileges.PrivilegeCount=1; OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES,&hToken); //返回访问令牌指针 LookupPrivilegeValue(NULL,SE_DEBUG_NAME,&luid); //获取LUID值 Privileges.Privileges[0].Luid=luid; Privileges.Privileges[0].Attributes=SE_PRIVILEGE_ENABLED; if(AdjustTokenPrivileges(hToken,FALSE,&Privileges,NULL,NULL,NULL)); //修改访问令牌 GetWindowThreadProcessId(hwnd,&pid); //获取扫雷进程ID HANDLE handleid=OpenProcess(PROCESS_ALL_ACCESS,FALSE,pid); //获取扫雷进程句柄 if(handleid) printf("got it!\n"); CloseHandle(hToken); return handleid; } |
|
ReadProcessMemory读取失败
[QUOTE=怀特迈恩;721952]那就不清楚了。 另: char addr[5]; int i; i= sizeof(addr[5]); 结果i=1 所以楼主sizeof(addr)这个最好改正下。 我第一次见这样用,以前都是sizeof(byte/word/dword/Uint64) if(Read...[/QUOTE] 晚上我再试试看 谢谢您 我是菜鸟 还请您多指教 |
|
ReadProcessMemory读取失败
还是不可以... |
|
ReadProcessMemory读取失败
代码本身有问题吗? |
|
ReadProcessMemory读取失败
扫雷的进程句柄 #include <stdio.h> #include <stdlib.h> #include <windows.h> HANDLE Getpid(); void ReadDataFromProcess(HANDLE hProcess); main(){ HANDLE hProcess; hProcess=Getpid(); ReadDataFromProcess(hProcess); system("pause"); } HANDLE Getpid(){ DWORD pid; HWND hwnd=FindWindow(NULL,"扫雷"); //获取扫雷窗口句柄 GetWindowThreadProcessId(hwnd,&pid); //获取扫雷进程ID HANDLE handleid=OpenProcess(PROCESS_ALL_ACCESS,FALSE,pid); //获取扫雷进程句柄 if(handleid) printf("got it!\n"); return handleid; } void ReadDataFromProcess(HANDLE hProcess){ char addr[1]; if(ReadProcessMemory(hProcess,(LPCVOID)0x1005340,&addr,sizeof(addr),0)) printf("读取成功\n"); else printf("读取失败\n"); } |
|
怎么实现论坛自动登录
没有高手能具体说明下吗? |
|
怎么实现论坛自动登录
保存cookis?新手不懂 楼上两位能具体点说明吗 |
|
|
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值