Created
November 3, 2016 08:04
-
-
Save strizhechenko/2fcbf666f0ee99ed591d6d1731cecc11 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
""" domain generator """ | |
from re import sub | |
from sys import argv | |
from random import shuffle | |
from string import ascii_lowercase | |
zones = [ | |
'com', 'net', 'ru', 'org', 'uk', 'en', 'ss', 'cn', | |
] | |
x = list(ascii_lowercase) + ['1', '2', '3', '4', '.', '.', '.'] | |
for i in xrange(int(argv[1])): | |
shuffle(x) | |
print sub(r'^\.|\.$', '', "".join(x).replace('..', '.').replace('..', '.')) + '.' + zones[i % len(zones)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment