Prefix 1
Prefix 1
#include <string>
#include <openssl/sha.h>
#include <iomanip>
#include <sstream>
#include <thread>
#include <vector>
stringstream ss;
for (int i = 0; i < SHA256_DIGEST_LENGTH; i++) {
ss << hex << setw(2) << setfill('0') << (int)hash[i];
}
return ss.str();
}
if (address.rfind(target_prefix, 0) == 0) {
cout << "\nFound address: " << address << endl;
cout << "Private Key: " << private_key << endl;
return;
}
}
}
threads.push_back(thread(find_address_with_prefix, start_private_key,
target_prefix, thread_start, thread_end));
}
int main() {
string start_private_key =
"000000000000000000000000000000000000000000000007545bf10859946eca";
string target_prefix = "1BY8GQbnueYofwSuFAT3USAhGjPrkxDdW9"; // Prefiks koji
tražimo (može biti duži niz)
int num_threads = 12; // Broj niti koje želimo da koristimo
// Pokretanje pretrage
search_with_threads(start_private_key, target_prefix, num_threads);
return 0;
}