#include #include #include using namespace std; //const string SALT = "$6$$7EmfCgedcnr2aCl4bRee1.x.6zDykqU.FWh5sxQa6W3bJoiCTtDHoMUy1O4zXOEgNMWEc/KqAvT8CKuYOQJOo0"; const string SALT = "$6$$y5001uAp0VHIIF9LiY3eGYrE2tZUKyXZ9hVuxC.jCEfJoDqH1Ab/eACMWYm6Bq0Xb18tW40FBiS9Qu7O9Jl3f/"; int main() { string password; string hash; for (char c = 'a'; c <= 'z'; c++) { password = c; //cout << "The password for " << c << " is " ; hash = crypt(password.c_str(), SALT.c_str()); //cout << hash << endl; if (hash == SALT) { cout << "We found it and it is " << c << endl; return 0; } } return 1; }