Giter Club home page Giter Club logo

iresolver's Introduction

iresolver

README.md | README_zh-CN.md

iresolver is a DNS resolver written in Go language. It can compare whether the resolution results of different DNS servers are the same as those of the baseline DNS servers.

Background

Originally, I was using dnsvalidator, but it could never run on my machine, and I encountered problems with the Python version when installing it on the server. Therefore, I decided to refer to the functions of dnsvalidator and implement a new program in Go language.

Installation

You can directly install this program using go install after configuring the GOBIN directory.

go install github.com/yuukisec/iresolver/cmd/iresolver@latest
iresolver -h

You can also clone the project to your local machine and compile it yourself.

git clone https://github.com/yuukisec/iresolver
cd iresolver
go build -o iresolver cmd/iresolver/main.go
./iresolver -h

Features

  • Specify DNS Server List: You can use the -target parameter to specify a file or URL containing a list of DNS servers. The file from the URL must be in plain text format.
  • Silent Mode: If you only want to output the DNS servers that have been successfully resolved, you can use the -silent parameter.
  • Specify Baseline DNS Servers: The program’s built-in default baseline DNS servers are 1.1.1.1 and 8.8.8.8. You can use the -dns parameter to specify other baseline DNS servers.
  • Specify Baseline Domains: The default baseline domains are qq.com and tencent.com. You can use the -domain parameter to specify other baseline domains.

For more parameter explanations, please refer to Complete Parameters.

Examples

Example 1: Use the built-in baseline DNS servers and domains of the tool to filter available DNS servers from Public DNS, specify threads as 200

iresolver -target https://public-dns.info/nameservers.txt -threads 200

Example 2: Use the built-in baseline DNS servers and domains of the tool to filter available DNS servers from the target.txt file, specify threads as 200

iresolver -target target.txt -threads 200

Example 3:

  • Use custom baseline DNS servers and domains to filter available DNS servers from Public DNS
  • Specify threads as 200, timeout as 10 seconds, retry times as 3
  • Stop running the program when the number of available DNS servers reaches 1000
  • Save the results to the resolvers.txt file
iresolver \
  -target https://public-dns.info/nameservers.txt \
  -dns 1.1.1.1,8.8.8.8 \
  -domain qq.com,tencent.com \
  -threads 200 \
  -timeout 10 \
  -retry 3 \
  -count 1000 \
  -outptu resolvers.txt

DNS Server List

Here are some DNS server lists that can be used for testing:

Complete Parameters

Usage of iresolver
  -count int
    	Specify the program to stop running after writing how many qualified domain servers (default 65535)
  -dns string
    	Manually specify DNS servers, multiple servers are separated by commas (default "1.1.1.1,8.8.8.8")
  -domain string
    	Manually specify domains, multiple domains are separated by commas (default "qq.com,tencent.com")
  -output string
    	Specify the output file
  -retry int
    	Specify the number of retries when matching fails (default 2)
  -silent
    	Whether to only output successfully resolved DNS servers
  -target string
    	Specify the file or URL of the DNS server list to be checked
  -threads int
    	Specify the number of running threads (default 20)
  -timeout int
    	Specify the timeout for DNS requests (default 10)

Additional Notes

  • The program runs in multithreaded mode. The quantity specified by the -count parameter may not be completely accurate. The results will only be more, not less.
  • Upon direct execution, the program will automatically select DNS servers from Public DNS as the target. This can be modified using the -target parameter.

iresolver's People

Contributors

y00k1sec avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.