密码破解
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"); }
相关文章推荐
- C++中值传递、指针传递和引用传递的比较
- 管理oracle 11g RAC 常用命令
- js兼容的placeholder属性详解
- 自己做的最简单的轮播图
- kickstart无人值守安装
- Hibernate错误
- 桌面应用程序和网站引入Mapl中的数学引擎
- xcode在真机调试的时候出现"The identity used to sign the executable is no longer valid"
- Json转换Java对象和JavaList集合
- 利用ODBC从列表导出数据到excel
- Arch下配置连接wpa加密wifi的方法
- c++中的sort 函数
- iOS NSPredicate用法
- maven 使用命令package或者compile报错 错误: 需要class, interface或enum
- iOS UITableView侧滑多选功能
- MS Open Tech 技术团队构建可靠的Windows版Redis
- SDWebImage 详解
- 实验一(不知道怎么上传.docx格式)
- JSP基本原理
- 关于DOM级别的一些问题,DOM0,DOM1,DOM2