All Projects → mr-karan → Doggo

mr-karan / Doggo

Licence: gpl-3.0
🐶 Command-line DNS Client for Humans. Written in Golang

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to Doggo

Gravity Sync
An easy way to synchronize the blocklist and local DNS configurations of multiple Pi-hole 5.x instances.
Stars: ✭ 406 (-21.17%)
Mutual labels:  dns
Virtual Hosts
hosts for android,implement by vpn mode,supports wildcard DNS records
Stars: ✭ 465 (-9.71%)
Mutual labels:  dns
Dnscrypt Wrapper
This is dnscrypt wrapper (server-side dnscrypt proxy), which helps to add dnscrypt support to any name resolver.
Stars: ✭ 493 (-4.27%)
Mutual labels:  dns
Edgedns
A high performance DNS cache designed for Content Delivery Networks
Stars: ✭ 423 (-17.86%)
Mutual labels:  dns
Twisted
Event-driven networking engine written in Python.
Stars: ✭ 4,442 (+762.52%)
Mutual labels:  dns
Dnsjava
The offical home of dnsjava - an implementation of the DNS protocol in Java.
Stars: ✭ 475 (-7.77%)
Mutual labels:  dns
Openwrt Fanqiang
最好的路由器翻墙、科学上网教程—OpenWrt—shadowsocks
Stars: ✭ 3,894 (+656.12%)
Mutual labels:  dns
Bugcrowd Levelup Subdomain Enumeration
This repository contains all the material from the talk "Esoteric sub-domain enumeration techniques" given at Bugcrowd LevelUp 2017 virtual conference
Stars: ✭ 513 (-0.39%)
Mutual labels:  dns
Encrypted Dns
Configuration profiles for DNS HTTPS and DNS over TLS for iOS 14 and MacOS Big Sur
Stars: ✭ 455 (-11.65%)
Mutual labels:  dns
Dictionary Of Pentesting
Dictionary collection project such as Pentesing, Fuzzing, Bruteforce and BugBounty. 渗透测试、SRC漏洞挖掘、爆破、Fuzzing等字典收集项目。
Stars: ✭ 492 (-4.47%)
Mutual labels:  dns
Shaman
Small, lightweight, api-driven dns server.
Stars: ✭ 426 (-17.28%)
Mutual labels:  dns
Information collection handbook
Handbook of information collection for penetration testing and src
Stars: ✭ 447 (-13.2%)
Mutual labels:  dns
Dns Proxy Server
Solve your DNS hosts from your docker containers, then from your local configuration, then from internet
Stars: ✭ 480 (-6.8%)
Mutual labels:  dns
Dnsrobocert
Orchestrate Certbot and Lexicon together to provide Let's Encrypt TLS certificates validated by DNS challenges
Stars: ✭ 420 (-18.45%)
Mutual labels:  dns
Auroradns.gui
纯净抗污染,简单轻量级
Stars: ✭ 494 (-4.08%)
Mutual labels:  dns
Godoh
🕳godoh - A DNS-over-HTTPS C2
Stars: ✭ 413 (-19.81%)
Mutual labels:  dns
Gobuster
Directory/File, DNS and VHost busting tool written in Go
Stars: ✭ 5,356 (+940%)
Mutual labels:  dns
Hosts For Surge
🌟 Hosts for Internet Freedom
Stars: ✭ 514 (-0.19%)
Mutual labels:  dns
Shuffledns
shuffleDNS is a wrapper around massdns written in go that allows you to enumerate valid subdomains using active bruteforce as well as resolve subdomains with wildcard handling and easy input-output support.
Stars: ✭ 498 (-3.3%)
Mutual labels:  dns
Dnscrypt Server Docker
A Docker image for a non-censoring, non-logging, DNSSEC-capable, DNSCrypt-enabled DNS resolver
Stars: ✭ 483 (-6.21%)
Mutual labels:  dns

doggo

🐶 Command-line DNS client for humans
doggo.mrkaran.dev

doggo CLI usage

doggo is a modern command-line DNS client (like dig) written in Golang. It outputs information in a neat concise manner and supports protocols like DoH, DoT as well.

It's totally inspired from dog which is written in Rust. I wanted to add some features to it but since I don't know Rust, I found it as a nice opportunity to experiment with writing a DNS Client from scratch in Go myself. Hence the name dog +go => doggo.

Features

  • Human readable output - supports colors and tabular format.
  • Supports JSON format - can be useful while writing scripts.
  • Has support for multiple transport protocols:
    • DNS over HTTPS (DoH)
    • DNS over TLS (DoT)
    • DNS over TCP
    • DNS over UDP
  • Supports ndots and search configurations from resolv.conf or command-line arguments.
  • Supports multiple resolvers at once.
  • Supports IPv4 and IPv6 both.
  • Available as a web tool as well: https://doggo.mrkaran.dev.

Installation

Binary

You can grab the latest binaries for Linux, MacOS and Windows from the Releases section.

For eg, to pull the latest linux-amd64 binary:

$ cd "$(mktemp -d)"
$ curl -sL "https://github.com/mr-karan/doggo/releases/download/v0.3.7/doggo_0.3.7_linux_amd64.tar.gz" | tar xz
$ mv doggo /usr/local/bin
# doggo should be available now in your $PATH
$ doggo

Docker

Images are hosted on Github Container Registry (ghcr.io). You can view all the tags here. It even supports ARM so you can spin up a container on your RPi to do DNS lookups, cause why not.

Pull

docker pull ghcr.io/mr-karan/doggo:latest

Running

You can supply all arguments to the CLI directly to docker run command. Eg:

docker run ghcr.io/mr-karan/doggo:latest mrkaran.dev @1.1.1.1 MX

Using snap

Get it from the Snap Store

$ sudo snap install doggo

NOTE: Since the confinement mode is strict as of now, it cannot access your host's /etc/resolv.conf. I'll be making a request in the Snap forums soon so that it can be manually reviewed and allowed to use --classic. Until then, please specify a nameserver manually if using snap.

From Source

You need to have go installed in your system.

$ go get github.com/mr-karan/doggo/cmd/doggo
$ mv $GOPATH/bin/cli $GOPATH/bin/doggo 

The binary will be available at $GOPATH/bin/doggo.

Usage Examples

Do a simple DNS Lookup for mrkaran.dev

$ doggo mrkaran.dev                                                                         
NAME            TYPE    CLASS   TTL     ADDRESS         NAMESERVER   
mrkaran.dev.    A       IN      20s     13.250.205.9    127.0.0.1:53
mrkaran.dev.    A       IN      20s     206.189.89.118  127.0.0.1:53

Query MX records for github.com using 9.9.9.9 resolver

doggo MX github.com @9.9.9.9
NAME            TYPE    CLASS   TTL     ADDRESS                         NAMESERVER 
github.com.     MX      IN      3600s   10 alt3.aspmx.l.google.com.     9.9.9.9:53
github.com.     MX      IN      3600s   5 alt1.aspmx.l.google.com.      9.9.9.9:53
github.com.     MX      IN      3600s   10 alt4.aspmx.l.google.com.     9.9.9.9:53
github.com.     MX      IN      3600s   5 alt2.aspmx.l.google.com.      9.9.9.9:53
github.com.     MX      IN      3600s   1 aspmx.l.google.com.           9.9.9.9:53

or using named parameters:

$ doggo -t MX -n 9.9.9.9 github.com
NAME            TYPE    CLASS   TTL     ADDRESS                         NAMESERVER 
github.com.     MX      IN      3600s   10 alt3.aspmx.l.google.com.     9.9.9.9:53
github.com.     MX      IN      3600s   5 alt1.aspmx.l.google.com.      9.9.9.9:53
github.com.     MX      IN      3600s   10 alt4.aspmx.l.google.com.     9.9.9.9:53
github.com.     MX      IN      3600s   5 alt2.aspmx.l.google.com.      9.9.9.9:53
github.com.     MX      IN      3600s   1 aspmx.l.google.com.           9.9.9.9:53

Query DNS records for archive.org using Cloudflare DoH resolver

$ doggo archive.org @https://cloudflare-dns.com/dns-query 
NAME            TYPE    CLASS   TTL     ADDRESS         NAMESERVER                           
archive.org.    A       IN      41s     207.241.224.2   https://cloudflare-dns.com/dns-query

Query DNS records for internetfreedom.in with JSON output

$ doggo internetfreedom.in --json | jq
{
  "responses": {
    "answers": [
      {
        "name": "internetfreedom.in.",
        "type": "A",
        "class": "IN",
        "ttl": "22s",
        "address": "104.27.158.96",
        "rtt": "37ms",
        "nameserver": "127.0.0.1:53"
      },
      {
        "name": "internetfreedom.in.",
        "type": "A",
        "class": "IN",
        "ttl": "22s",
        "address": "104.27.159.96",
        "rtt": "37ms",
        "nameserver": "127.0.0.1:53"
      },
      {
        "name": "internetfreedom.in.",
        "type": "A",
        "class": "IN",
        "ttl": "22s",
        "address": "172.67.202.77",
        "rtt": "37ms",
        "nameserver": "127.0.0.1:53"
      }
    ],
    "queries": [
      {
        "name": "internetfreedom.in.",
        "type": "A",
        "class": "IN"
      }
    ]
  }
}

Query DNS records for duckduckgo.com and show RTT (Round Trip Time)

$ doggo duckduckgo.com --time                
NAME            TYPE    CLASS   TTL     ADDRESS         NAMESERVER      TIME TAKEN 
duckduckgo.com. A       IN      30s     40.81.94.43     127.0.0.1:53    45ms      

Command-line Arguments

Transport Options

URL scheme of the server is used to identify which resolver to use for lookups. If no scheme is specified, defaults to udp.

  @udp://        eg: @1.1.1.1 initiates a UDP resolver for 1.1.1.1:53.
  @tcp://        eg: @1.1.1.1 initiates a TCP resolver for 1.1.1.1:53.
  @https://      eg: @https://cloudflare-dns.com/dns-query initiates a DOH resolver for Cloudflare DoH server.
  @tls://        eg: @1.1.1.1 initiates a DoT resolver for 1.1.1.1:853.

Query Options

  -q, --query=HOSTNAME        Hostname to query the DNS records for (eg mrkaran.dev).
  -t, --type=TYPE             Type of the DNS Record (A, MX, NS etc).
  -n, --nameserver=ADDR       Address of a specific nameserver to send queries to (9.9.9.9, 8.8.8.8 etc).
  -c, --class=CLASS           Network class of the DNS record (IN, CH, HS etc).

Resolver Options

  --ndots=INT        Specify ndots parameter. Takes value from /etc/resolv.conf if using the system nameserver or 1 otherwise.
  --search           Use the search list defined in resolv.conf. Defaults to true. Set --search=false to disable search list.
  --timeout          Specify timeout (in seconds) for the resolver to return a response.
  -4 --ipv4          Use IPv4 only.
  -6 --ipv6          Use IPv6 only.

Output Options

  -J, --json                  Format the output as JSON.
  --color                     Defaults to true. Set --color=false to disable colored output.
  --debug                     Enable debug logging.
  --time                      Shows how long the response took from the server.

Contributing

I'm open to accept feature requests and/or issues. I understand doggo is a new DNS Client in the town and there might be some edge cases I am not handling. Please feel free to open issues if you ever come across such a case. For now I am focussing more on planned features for a stable v1.0 release soon.

License

LICENSE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].