Git Product home page Git Product logo

dns-client's Introduction

DNS Lookup

A simple client software for the DNS protocol.

Supported Features

  • Reverse DNS Queries.
  • Standard DNS Queries.
  • Support both Ipv4 and Ipv6 protocol.
  • Multiple inputs in a domain form or in an ip form.

How it works

Given an input domain or an input ip, the program will query the google DNS server and it will output all the IPs and domains that belongs to the requested input in JSON. Please, see this section.

It does all this stuff using only the golang standard library and using the DNS protocol specification available in rfc 1035 and microsoft documentation

Usage example

Basic execution: go run ./main.go 2001:4860:4860::8888 8.8.4.4 google.com microsoft.com cloudflare.com facebook.com

You can build a binary using the follow command: go build -o <some name> main.go and execute with ./<binary-name> 2001:4860:4860::8888 8.8.4.4 google.com

Output Example

Standard DNS Query:

{
  "header": {
    "id": 59981,
    "questions": 1,
    "answers": 1,
  },
  "answers": [
    {
      "metadata": {
        "domain": "google.com",
        "type": 1,
        "class": 1,
        "ttl": 20,
        "length": 4
      },
      "resource": "142.250.218.238"
    }
  ],
  "name_servers": null
}

Reverse DNS Query:

{
  "header": {
    "id": 44802,
    "questions": 1,
    "answers": 1,
  },
  "answers": [
    {
      "metadata": {
        "domain": "4.4.8.8.in-addr.arpa",
        "type": 12,
        "class": 1,
        "ttl": 21189,
        "length": 12
      },
      "resource": "dns.google"
    }
  ],
  "name_servers": null
}

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.