name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-3528650120430763&dt=1183890684015&lmt=1183890684&format=468x60_as&output=html&correlator=1183890684000&url=http://gmai9999.googlepages.com/home&ad_type=text_image&ui=rc:0&cc=100&flash=9&u_h=768&u_w=1024&u_ah=738&u_aw=1024&u_cd=32&u_tz=480&u_java=true" frameborder="0" width="468" scrolling="no" height="60" allowtransparency="allowtransparency">
//密码穷举法
string[] chs=new string[]{"0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}; int count =0;//计算次数 int ndictcount=chs.Length;//密码词典长度 string psw,mima,s;//要生成的密码 psw=""; s=""; mima="micel108abd2134";
int lenmin=mima.Length; for(int i=0;i<lenmin;i++)//密码长度不知道 { for(int j=0;j<ndictcount;j++) { count+=1; s=mima[i].ToString(); if(chs[j]==s) { psw+=chs[j]; } } }
Console.WriteLine("密码为{0},计算次数为{1}",psw,count); name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-3528650120430763&dt=1183890684015&lmt=1183890684&format=468x60_as&output=html&correlator=1183890684000&url=http://gmai9999.googlepages.com/home&ad_type=text_image&ui=rc:0&cc=100&flash=9&u_h=768&u_w=1024&u_ah=738&u_aw=1024&u_cd=32&u_tz=480&u_java=true" frameborder="0" width="468" scrolling="no" height="60" allowtransparency="allowtransparency">