您的位置:首页 > 其它

密码破解

2015-11-16 15:51 274 查看
#include <iostream>
#include <string.h>
#include <stdlib.h>
void main()
{
using namespace std;
cout<<"请输入您的密码: ";
char psw[100];
cin.get(psw,100);
int len = strlen(psw);
char * ppsw = new char[len+1];
for(int n=0;n<len+1;n++)
ppsw
=0;
cout<<"<<<逐个匹配>>>:\n";
for(int i=0;i<len;i++)//最后一个空字符不用匹配
{
cout<<"破解进行中...匹配>>";
for(int j=32;j<127;j++)
{
for(int m=0;m<5000000;m++);
cout<<(char)j<<"\b";
if(psw[i] == j)
{
ppsw[i]=j;
cout<<"\n密码第 "<<i+1<<" 个字符为: "<<(char)j<<endl;
break;
}
}
}
cout<<"\n破解成功!\n";
cout<<"你的密码是:"<<ppsw<<endl;
system("pause");
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: