<commit_before>// Copyright 2017-2021 <NAME>. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.

package config

import (
	"context"
	"encoding/csv"
	"errors"
	"fmt"
	"io"
	"strconv"
	"strings"

	"github.com/OWASP/Amass/v3/net/http"
	"github.com/caffix/stringset"
	"github.com/go-ini/ini"
)

// DefaultQueriesPerPublicResolver is the number of queries sent to each public DNS resolver per second.
const DefaultQueriesPerPublicResolver = 50

// DefaultQueriesPerBaselineResolver is the number of queries sent to each trusted DNS resolver per second.
const DefaultQueriesPerBaselineResolver = 50

const minResolverReliability = 0.85

// DefaultBaselineResolvers is a list of trusted public DNS resolvers.
var DefaultBaselineResolvers = []string{
	"8.8.8.8",        // Google
	"1.1.1.1",        // Cloudflare
	"9.9.9.9",        // Quad9
	"208.67.222.222", // Cisco OpenDNS
	"192.168.3.11",    // Level3
	"172.16.58.3",      // Verisign
	"192.168.127.12",   // DNS.WATCH
	"8.26.56.26",     // Comodo Secure DNS
	"192.168.3.11",    // puntCAT
	"172.16.17.32",    // Hurricane Electric
	"192.168.127.12",      // Yandex.DNS
}

// PublicResolvers includes the addresses of public resolvers obtained dynamically.
var PublicResolvers []string

func init() {
	addrs, err := getPublicDNSResolvers()
	if err != nil {
		return
	}
loop:
	for _, addr := range addrs {
		for _, baseline := range DefaultBaselineResolvers {
			if addr == baseline {<commit_msg>Increased potential DNS resolver rates<commit_after>// Copyright 2017-2021 <NAME>. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.

package config

import (
	"context"
	"encoding/csv"
	"errors"
	"fmt"
	"io"
	"strconv"
	"strings"

	"github.com/OWASP/Amass/v3/net/http"
	"github.com/caffix/stringset"
	"github.com/go-ini/ini"
)

// DefaultQueriesPerPublicResolver is the number of queries sent to each public DNS resolver per second.
const DefaultQueriesPerPublicResolver = 50

// DefaultQueriesPerBaselineResolver is the number of queries sent to each trusted DNS resolver per second.
const DefaultQueriesPerBaselineResolver = 100

const minResolverReliability = 0.85

// DefaultBaselineResolvers is a list of trusted public DNS resolvers.
var DefaultBaselineResolvers = []string{
	"8.8.8.8",        // Google
	"1.1.1.1",        // Cloudflare
	"9.9.9.9",        // Quad9
	"208.67.222.222", // Cisco OpenDNS
	"192.168.3.11",    // Level3
	"172.16.58.3",      // Verisign
	"192.168.127.12",   // DNS.WATCH
	"8.26.56.26",     // Comodo Secure DNS
	"192.168.3.11",    // puntCAT
	"172.16.17.32",    // Hurricane Electric
	"192.168.127.12",      // Yandex.DNS
}

// PublicResolvers includes the addresses of public resolvers obtained dynamically.
var PublicResolvers []string

func init() {
	addrs, err := getPublicDNSResolvers()
	if err != nil {
		return
	}
loop:
	for _, addr := range addrs {
		for _, baseline := range DefaultBaselineResolvers {
			if addr == baseline {
{'fraction_non_alphanumeric': 0.1219672131147541, 'fraction_numerical': 0.06983606557377049, 'mean_word_length': 3.1966987620357634, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 22, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6916705', 'n_tokens_mistral': 1204, 'n_tokens_neox': 1036, 'n_words': 298}