Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import threading, socket, time
- def runwhois(query, server):
- whoisconnection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- whoisconnection.connect((server, 43))
- queryinbytes = (query + "\r\n").encode()
- whoisconnection.send(queryinbytes)
- response = b''
- while True:
- replyinbytes = whoisconnection.recv(4096)
- response += replyinbytes
- if not replyinbytes:
- break
- whoisconnection.close()
- jj = response.decode('utf-8')
- return jj
- def iowhois(domain):
- g = runwhois(domain, "io.whois-servers.net")
- if "Not" not in g:
- print(domain)
- def main():
- with open("wordlist.txt") as f:
- domlist = [x.strip() for x in f.readlines() if x.strip()]
- for i in domlist:
- t = threading.Thread(target=iowhois, args=(i,))
- t.start()
- while threading.activeCount()>9:
- time.sleep(.1)
- while threading.activeCount()>1:
- time.sleep(.1)
- main()
Advertisement
Add Comment
Please, Sign In to add comment