Brute-force programming part 2..
Now i managed to brute-force a string password but when i input a password like 'test' without quotes it just output the first or second letter of the password.. this is the code : #include <iostream> #include <string> using namespace std; int main() { string password; cout << "Enter a string password = "; cin >> password; const int alphabets = 26; const string alphabetslow = "abcdefghijklmnopqrstuvwxyz" ; string bruted; int countslow = 0; int i; do { for ( i = 0; i < 26; i++) { if (password[countslow] == alphabetslow[i]) { bruted += alphabetslow[i]; countslow++; } } } while (i < 25); cout << "Brute-Forced password is = "; cout << bruted << endl; return 0; } is there a problem with my code ??