def dns_sweep(self,file_with_ips,file_prefix):
        logging.info("Finding misconfigured DNS servers that might allow zone transfers among live ips ..")
        self.shell.shell_exec("nmap -PN -n -sS -p 53 -iL "+file_with_ips+" -oA "+file_prefix)

# Step 2 - Extract IPs
        dns_servers=file_prefix+".dns_server.ips"
        self.shell.shell_exec("grep \"53/open/tcp\" "+file_prefix+".gnmap | cut -f 2 -d \" \" > "+dns_servers)
        file = FileOperations.open(dns_servers)
        domain_names=file_prefix+".domain_names"
        self.shell.shell_exec("rm -f "+domain_names)
        num_dns_servers = 0
        for line in file:
            if line.strip('\n'):
                dns_server = line.strip('\n')
                self.shell.shell_exec("host "+dns_server+" "+dns_server+" | grep 'domain name' | cut -f 5 -d' ' | cut -f 2,3,4,5,6,7 -d. | sed 's/\.$//' >> "+domain_names)
                num_dns_servers = num_dns_servers+1
        try:
            file = FileOperations.open(domain_names, owtf_clean=False)
        except __HOLE__:
            return

        for line in file:
            domain = line.strip('\n')
            raw_axfr=file_prefix+"."+dns_server+"."+domain+".axfr.raw"
            self.shell.shell_exec("host -l "+domain+" "+dns_server+" | grep "+domain+" > "+raw_axfr)
            success=self.shell.shell_exec("wc -l "+raw_axfr+" | cut -f 1  -d ' '")
            if success > 3:
                logging.info("Attempting zone transfer on $dns_server using domain "+domain+".. Success!")

                axfr=file_prefix+"."+dns_server+"."+domain+".axfr"
                self.shell.shell_exec("rm -f "+axfr)
                logging.info(self.shell.shell_exec("grep 'has address' "+raw_axfr+" | cut -f 1,4 -d ' ' | sort -k 2 -t ' ' | sed 's/ /#/g'"))
            else:
                logging.info("Attempting zone transfer on $dns_server using domain "+domain+"  .. Success!")
                self.shell.shell_exec("rm -f "+raw_axfr)
        if num_dns_servers==0:
            return
dataset/ETHPy150Open owtf/owtf/framework/plugin/scanner.py/Scanner.dns_sweep