Skip to content

Instantly share code, notes, and snippets.

@mike-pete
Created April 18, 2020 20:33
Show Gist options
  • Save mike-pete/f3137b995494a2a45d9ec7069506e074 to your computer and use it in GitHub Desktop.
Save mike-pete/f3137b995494a2a45d9ec7069506e074 to your computer and use it in GitHub Desktop.
# https://stackoverflow.com/questions/12297500/python-module-for-nslookup
import socket
import random
words = '''\
profile
info
swap
tag
me
meet
greet
tap
yes
friend
share
swap
connect
with
new
lets
go
run
pair
pear
join
net
network
time
tyme\
'''
# turn the words string into an array
words = words.split('\n')
combos = []
for i in words:
for ii in words:
combos.append(i+ii)
# loop through the list in random order
free = 0
while len(combos) > 0:
ran = random.randint(0,len(combos)-1)
name = combos.pop(ran) + '.com'
try:
ip_list = list({addr[-1][0] for addr in socket.getaddrinfo(name, 0, 0, 0, 0)})
except:
print(name)
free += 1
print(free,'domains free')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment