Board logo

標題: 密碼暴力破解器核心代碼 [打印本頁]

作者: 霧隱雷藏    時間: 2008-11-2 11:48     標題: 密碼暴力破解器核心代碼

#include <iostream>
#include <cmath>

using namespace std;

int main()
{
char chr[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
int a, chrlen = strlen(chr);
cout << "請輸入密碼長度: ";
cin >> a;
cout.setf(ios::fixed);
int (*b)[1] = new int[a][1];
for (int i=0;i<a;i++)
b[0] = 0;
for (int i=0;i<pow(chrlen,(float)a);i++)
{
for (int j=a-1;j>=0;j--)
{
if (b[j][0]>=chrlen && j>0)
{
b[j][0] = 0;
b[j-1][0]++;
}
cout << chr[b[j][0]];
}
cout << " ";
b[a-1][0]++;
}
delete b;
system("PAUSE");
return 0;
}




這個程式是不是不能破解密碼




歡迎光臨 香港 Xocat Forum 討論區 (http://p.xocat.com/p/) Powered by Discuz! 6.0.0