Skip to content

Instantly share code, notes, and snippets.

@jaircuevajunior
Last active May 4, 2020 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaircuevajunior/15a03be9f984c03b82c0e9ca11864688 to your computer and use it in GitHub Desktop.
Save jaircuevajunior/15a03be9f984c03b82c0e9ca11864688 to your computer and use it in GitHub Desktop.
Comando para pegar o nameserver (DNS) do domínio

Comando para pegar o nameserver (DNS) do domínio

Copie o script pra /usr/local/bin/dns ou ~/bin/dns e torne-o executável ex: chmod +x paht/to/dnsfile

#!/bin/bash

whois $1 |grep 'Name Server\|nserver'|cut -d':' -f2|sort|uniq|xargs|tr ' ' '\n'

Exemplo

Comando: dns din.host

Retorno:

NS1.DINHOST.COM.BR
NS2.DINHOST.COM.BR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment