Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- #include <ctime>
- using namespace std;
- int main()
- {
- const string s = "0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
- const short aSize = 62;
- const short pSize = 8;
- string pass = "00000000";
- ofstream out ("t.txt");
- out << pass << endl;
- time_t now = time(0);
- for (int j = 0, c = 0; j < pSize; ++j)
- {
- if (pass[j] != s[aSize-1])
- {
- for (short h = j - 1; h >= 0; --h)
- pass[h] = s[0];
- pass[j] = s[s.find(pass[j]) + 1];
- out << pass << endl;
- j = -1;
- ++c;
- }
- if (time(0) - now > 1)
- {
- cout << c << " passwords per second" << endl;
- c = 0;
- now = time(0);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement