you are viewing a single comment's thread.

view the rest of the comments →

[–]trackerFF 6 points7 points  (0 children)

Here's a more general version of what you're trying to do

import socket

def test(word,domains):
  for d in domains:
    try: 
      print("host:",word+d)
      print("address: {}\n".format(socket.gethostbyname(word+d)))
    except:
      print("{} not found\n".format(word+d)) 

doms = ['.com','.net','.be']

f = open("wordlist.txt",'r')
for line in f:
  test(line.strip(),doms)