def readDNSServerFile(dnsserverfile):
    dnsservers = []
    try:
        f = open(dnsserverfile,"rb")
        content = f.readlines()
        f.close()
        for dnsline in content:
            if not dnsline.startswith('#') and dnsline.replace(" ","") != "":
                dnsserver = dnsline.replace("\n","").replace("\r","")
                if not dnsserver in dnsservers:
                    dnsservers.append(dnsserver)
    except:
        print "[-] Unable to read DNS server file %s" % dnsserverfile
    return dnsservers

    
# routine to perform DNS lookups
dataset/ETHPy150Open corelan/dnshjmon/dnshjmon.py/readDNSServerFile/original