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
std::string dic_based_pseudorandom(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" }; | |
std::string domain_dic[] = {"intel", "speak", "dog", "cat", "at", "criteria", "cyber", "security", "dictionary", "world", "safe", "health", "shadow", "game", "star", "enter", "into", "life", "time", "kudos", "arch", "result", "change"}; | |
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 += domain_dic[((1 << (year ^ month ^ day)) % (sizeof(domain_dic) / sizeof(*domain_dic)))]; | |
} |
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); |
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
#!/usr/bin/env python3 | |
from scapy.all import * | |
mapping = {0x04 :"a", | |
0x05 :"b", | |
0x06 :"c", | |
0x07 :"d", | |
0x08 :"e", | |
0x09 :"f", |
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
using System; | |
using System.Security.Cryptography.X509Certificates; | |
using System.Text; | |
namespace xor_decrypt_url | |
{ | |
class Program | |
{ |