请教各路英雄豪杰,那里有密码字典的算法函数!
高分相送!还提供MM。
高分相送!还提供MM。
解决方案 »
- 在桌面上用鼠标绘图并且能够保存并在次载入到桌面上
- indy的idtcpclient报“socket error 10054 ”错误,请问各位有没有碰到过?
- 在字符串中寻找字符函数
- 锁定网格宽度的问题
- no value given for one or more required pqrameters
- 我的dvd光驱现在无法识别dvd碟片,但能正常读取cd-rom.这种问题能修好吗?
- 怎样获得一个EXCEL文件的sheet名称???(在线等待)
- 我有个问题就是:在dbgrid中的异常处理扎办,
- 局域网中的通讯问题(UDP)??
- 各位大哥帮帮忙!!!很急|〈〈重谢〉〉
- 我在一个主表单1的一个按钮中SHOWMODAL另一个表单2,想让FORM2能直接使用FORM1中的。。。
- 如何控制打印?
{
#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();
}
还是要谢谢他。
还是要谢谢他。