Last active
May 19, 2020 15:36
-
-
Save blaquee/c38f452e92f7ebd4de6a 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
import string | |
import random | |
import os | |
def gen_domain(seed): | |
multiplier = int(0x41C64E6D) | |
#seed = 1600000 | |
domain = "" | |
ebx = seed | |
eax = 0 | |
edi = 12435 | |
esi = 32767 | |
ebx = ebx * multiplier | |
ebx = ebx + edi | |
eax = ebx | |
edx = eax | |
eax = eax * multiplier | |
eax = eax + edi | |
ecx = eax | |
eax = eax * multiplier | |
edx = (edx >> 8) & esi | |
ecx = (ecx >> 8) & esi | |
ecx = ecx * edx | |
eax = eax + edi | |
ebx = eax | |
eax = (eax >> 8) & esi + ecx | |
ecx = 6 | |
edx = eax % ecx | |
#print "EDX {}".format(edx) | |
''' | |
push 6 | |
cdq | |
pop ecx | |
idiv ecx | |
add edx, 7 | |
test edx, edx | |
''' | |
#edx = ((edx << 32) | eax) %6 | |
#random.seed(edx) | |
#d_len = random.randint(0,5) + 7 | |
domain_len = edx + 7 | |
print "domain_len {}".format(domain_len) | |
for i in range(domain_len): | |
ebx = (ebx * multiplier) + edi | |
eax = ebx | |
eax = (eax >> 8) & esi | |
edx = ((edx << 32) | eax) % 26 | |
edx += 97 | |
domain += chr(edx) | |
return domain | |
def main(): | |
seeder = 1600000 | |
names = [] | |
TLDs = ["dyndns.org", | |
"yi.org", | |
"dynserv.com", | |
"mooo.com", | |
"dyndns.org", | |
"yi.org", | |
"mooo.com", | |
"com", | |
"cc", | |
"net" | |
] | |
tld_choice = 0 | |
for i in range(100): | |
name = gen_domain(seeder) | |
seeder += 1 | |
seeder += 1 | |
name = name + "." + TLDs[tld_choice] | |
tld_choice += 1 | |
if tld_choice == len(TLDs): | |
tld_choice = 0 | |
names.append(name) | |
print names | |
if __name__ == '__main__': | |
main() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment