#include #include using namespace std; string crackPassword(string pass); long long int attempt; clock_t start_t, end_t; int main(){ string password; cout << "Enter the password to crack : "; cin >> password; cout << endl << endl << endl << ">\n>> CRACKED THE PASSWORD! >>\n>" << endl << endl <<"The password : " << crackPassword(password) << endl; cout << "The number of attempts : " << attempt << endl; cout << "The time duration passed : " << (double)(end_t - start_t)/1000 << " seconds" << endl << endl; return 0; } string crackPassword(string pass){ int digit[7],alphabetSet=1,passwordLength=1; start_t = clock(); string test,alphabet = "1337 also daktari is pro"; while(1){ switch(passwordLength){ case 1: while(alphabetSet<4){ switch(alphabetSet){ case 1 : alphabet = "-0123456789"; cout << endl << endl <<"Testing only digits(0123456789) - 10 Characters, please wait"; break; case 2 : alphabet = "-abcdefghijklmnopqrstuvwxyz"; cout << endl << endl << "Couldn't find the password, increasing the searching level."<< endl << endl << "Testing only lowercase characters(abcdefghijklmnopqrstuvwxyz) - 26 Characters, please wait"; break; case 3 : alphabet = "-ABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << endl << endl << "Couldn't find the password, increasing the searching level."<< endl << endl << "Testing only uppercase characters(ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 26 Characters, please wait"; break; } for(digit[0]=1;digit[0]