password
来源:互联网 发布:郭沫若天狗知乎 编辑:程序博客网 时间:2024/04/28 05:04
void createpassword()
{
#define passwordmax 8//将生成密码的最大长度
char a[]="0123456789abcdefghijklmnopqrstuvwxyz";//可能的字符
long ndictcount=sizeof(a);//获得密码词典长度
char cpass[passwordmax+2];//将生成的密码
long nminl=1,nmaxl=3;//本例中密码长度从1-3
long array[passwordmax];//密码词典下标
assert(nminl<=nmaxl && nmaxl<=passwordmax);//容错保证
long nlength=nminl;
register long j,i=0;
bool bnext;
cstdiofile file;
file.open("c://dict.txt",cfile::modecreate|cfile::modewrite);
while(nlength<=nmaxl)
{
for(i=0;i<passwordmax;i++)
array[i]=0;
bnext=true;
while(bnext)
{
for(i=0;i<nlength;i++)
cpass[i]=a[array[i]];
cpass[i]='/0';
file.writestring(cpass);
file.writestring("/n");
for(j=nlength-1;j>=0;j--)//密码指针进位
{
array[j]++;
if(array[j]!=ndictcount-1)break;
else
{
array[j]=0;
if(j==0)bnext=false;
}
}
}
nlength++;
}
file.close();
}
- password
- password
- Password
- password
- Password
- PASSWORD
- Password
- Password
- PASSWORD CHECK
- Password function
- ADSL Password
- Operation Password
- password studio
- ID/PASSWORD
- my password
- forget password
- Password strength
- Password cracking
- Asp三级联动下拉菜单数据库调用版
- 【转】信息时代,我们如何学习
- Google Map开发系列——總結篇
- 学习使用Depend工具,#pragma, Mutex,Event
- linux信号表
- password
- Linux定时任务系统Cron入门
- VB.net多线程技术知识
- 由atof发现的C中浮点小数不精确问题
- ngli装修之集采篇
- ORACLE优化--执行计划
- Linux下加挂文件系统
- 链表的逆置和链表的合并代码实现
- 互联网十大商业模式