龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 软件开发 > VC开发 >

用vc++穷举windows应用程序密码(续)(4)

时间:2009-12-30 15:42来源:未知 作者:admin 点击:
分享到:
lpszTmpCurrentPassword.Format ("%s",lpszCurrentPassword); lstrcpy(lpszPassword,lpszTmpCurrentPassword,lpszTmpCurrentPassword.GetLength ()+1); bSetOk=true; break; } else {CharCode=lpszCharSet.Left(1);

lpszTmpCurrentPassword.Format ("%s",lpszCurrentPassword);

lstrcpy(lpszPassword,lpszTmpCurrentPassword,lpszTmpCurrentPassword.GetLength ()+1); 

bSetOk=true;

break;

}

    else

    {CharCode=lpszCharSet.Left(1);

if(i!=nStrLen)lpszTmpCurrentPassword.Format("%s%s%s",lpszTmpCurrentPassword.Left(i-1),CharCode,lpszTmpCurrentPassword.Right(nStrLen-i));

else  lpszTmpCurrentPassword.Format("%s%s",lpszTmpCurrentPassword.Left(i-1),CharCode);

    WritePrivateProfileString(lpszMethod,"当前密码",(LPCTSTR)lpszTmpCurrentPassword,"Setup.ini");

        i--;

    }

}

if(bSetOk)

    {

 

    return;

    }

lpszTmpCurrentPassword.Insert(0,lpszCharSet.Left(1));

WritePrivateProfileString(lpszMethod,"当前密码",(LPCTSTR)lpszTmpCurrentPassword,"Setup.ini");

lpszTmpCurrentPassword.Format ("%s",lpszCurrentPassword); 

lstrcpyn(lpszPassword,lpszTmpCurrentPassword,lpszTmpCurrentPassword.GetLength ()+1); 

return; 

} 

void CGetCodeDlg::OnBrowse()

{CFileDialog m_FileOpen(TRUE,"*.txt","*.txt",OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,NULL,NULL);

TCHAR lpBuffer[MAX_PATH];

LPTSTR *lpFilePart=NULL;

GetFullPathName(lpszPath,sizeof(lpBuffer),lpBuffer,lpFilePart);

m_FileOpen.m_ofn.lpstrInitialDir =lpBuffer;

m_FileOpen.DoModal();

精彩图集

赞助商链接