Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- string password;
- cout << "Enter a string password = ";
- cin >> password;
- string alphabetslow = "abcdefghijklmnopqrstuvwxyz" ;
- string alphabetsup = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
- string numerics = "123456789" ;
- string bruted;
- int counts = 0;
- int i;
- do {
- cout << "Brute-forcing... \n";
- for ( i = 0; i < 26; i++) {
- if (password[counts] == alphabetsup[i]) {
- bruted += alphabetsup[i];
- counts++;
- } else if (password[counts] == alphabetslow[i]) {
- bruted += alphabetslow[i];
- counts++;
- }
- }
- } while (password != bruted);
- cout << "Brute-Forced password is = ";
- cout << bruted << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement