Giter VIP home page Giter VIP logo

dnsline's Introduction

dnsline

Making it easy to grep & cut accurate dns results.

Dnsline uses a similar approach as a recursive dns resolver with a cache to get the results. This means that there is no need to supply a list of resolvers, and the results will come directly from the authoritative dns servers.

Install

go install github.com/AlfredBerg/dnsline@latest

Old go versions <1.16:

go get -u github.com/AlfredBerg/dnsline

Usage

Basic usage:

$ cat domains.txt | dnsline
example.com.>[203.0.113.1]
cname.example.com.>cname-chain.example.com.>[203.0.113.1 203.0.113.2]

Get response difference

$ cat domains.txt | dnsline -m responsediff
example.com [203.0.113.1]@a.iana-servers.net. false
cdn.example.com [203.0.113.1]@a.iana-servers.net. [203.0.113.2]@b.iana-servers.net. true

Get status difference

$ cat domains.txt | dnsline -m statusdiff
example.com [[email protected]. [email protected].] false
foo.example.com [[email protected]. [email protected].] false
diff.example.com [[email protected]. [email protected].] true

Get SOA (Start Of Authority)

$ cat domains.txt | dnsline -m soa
example.com. for example.com
example.com. for foo.example.com
delegation.example.com. for a.delegation.example.com

Options

$ dnsline -h
Usage: 
  -c int
    	Number of goroutines that try to resolve domains. (default 10)
  -i string
    	File to read input from if STDIN is not used.
  -m string
    	Mode to use. Available: resolve, soa, statusdiff, responsediff
    		resolve: Resolve the input domains and output the whole CNAME chain and all ip-addresses.
    		soa: Print the FQDN of the closes SOA (Start Of Authority).
    		statusdiff: Check if there is a difference between the statuses from the authoritative nameservers.
    		responsediff: Check if there is a difference between the resolved address(es) from the authoritative nameservers.
    	 (default "resolve")
  -q	Query for AAAA records instead of A records
  -x	Disable the nameserver cache. With this disabled all queries will begin from the DNS ROOT.

dnsline's People

Contributors

alfredberg 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.