Created
February 19, 2021 12:09
-
-
Save fatihsnsy/5c3b591250c820aef5d2dbba958b584a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
std::string generator(int year, int month, int day, int hour, int minute, int second, int domain_len) { | |
std::string domain = {}; | |
std::string tlds[] = { ".com", ".net", ".org", ".biz", ".io", ".run" }; | |
for (int i = 0; i < domain_len; i++) { | |
year = ((year ^ 8 * year) >> 11) ^ ((year & 0xFFFFFFF0) << 17) ^ (hour ^ ((second ^ 0xFFFFFFF8) << 8)); | |
month = ((month ^ 4 * month) >> 25) ^ 16 * (month & 0xFFFFFFF8) ^ (minute ^ ((second ^ 0xFFFFFFFE) << 4)); | |
day = ((day ^ (day << 13)) >> 19) ^ ((day & 0xFFFFFFFE) << 12) ^ ((second ^ 0xFFFFFFF0) << 3); | |
domain += (char)(((1 << (year ^ month ^ day)) % 25) + 97); | |
} | |
return domain + tlds[(1 << day) % 6]; | |
} | |
int main(int argc, char *argv[]) | |
{ | |
std::cout << "Hello World!\n"; | |
std::string ret_domain = generator(21, 2, 20, atoi(argv[1]), atoi(argv[2]), atoi(argv[3]), 16); | |
std::cout << ret_domain; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment