Simple tool check informations from domain name with golang

LOOKUP

LOOKUP is a simple tool check IP informations, CNAME, NS(Name Server), A records, MX records, TXT records with Go.

/\/| __ /\/| __
|/\/ /_/ |/\/ /_/
___ ___
/ _ \ / _ \
| (_) | | (_) |
\___/ …


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Duc Tran

LOOKUP

LOOKUP is a simple tool check IP informations, CNAME, NS(Name Server), A records, MX records, TXT records with Go.

     /\/| __   /\/| __
    |/\/ /_/  |/\/ /_/
      ___     ___
     / _ \   / _ \
    | (_) | | (_) |
     \___/   \___/

Full source code in here

Fundamental

  • CNAME: is a Canonical Name Record or Alias Record. A type of resource record in the Domain Name System (DNS), that specifies that one domain name is an alias of another canonical domain name.

  • A and AAAA Record: An A and AAAA record are actually primary DNS records. They associate a domain name with a specific IP address.

  • TXT Record : A TXT record (short for text record) is a type of resource record in the Domain Name System (DNS) used to provide the ability to associate arbitrary text with a host or other name, such as human readable information about a server, network, data center, or other accounting information.

  • MX(Mail Exchanger) Record: A mail exchanger record (MX record) specifies the mail server responsible for accepting email messages on behalf of a domain name. It is a resource record in the Domain Name System (DNS). It is possible to configure several MX records, typically pointing to an array of mail servers for load balancing and redundancy.

  • NameServer: Nameserver is a server on the internet specialized in handling queries regarding the location of a domain name's various services. Nameservers are a fundamental part of the Domain Name System (DNS). They allow using domains instead of IP addresses.

Install

First, install golang.

Then, clone from soucre code and setup:

git clone https://github.com/ductnn/lookup.git
cd lookup
go get

Usage

Without docker

Run command:

go run main.go
# Enter domain you want to check.
# Example
google.com



Check result:

CNAME



TXT records



IP informations



Name Servers



MX records



With docker

Check Dockerfile and build with command:

docker build -t <your-image> -f Dockerfile .

or pulls my image in here, and run container

docker run -it ductn4/loo

With file binary

You can down file binary in here for running tool:

# Download file bin to your local
chmod +x loo
./loo
# And check result ...

Test with facebook.com:

➜  bin git:(master) ✗ ./loo

     /\/| __   /\/| __
    |/\/ /_/  |/\/ /_/
      ___     ___
     / _ \   / _ \
    | (_) | | (_) |
     \___/   \___/


Enter subdomain or domain name:
facebook.com

CNAME
+---------------------+--------------+---------------+
| DOMAIN OR SUBDOMAIN |    DOMAIN    |     CNAME     |
+---------------------+--------------+---------------+
| facebook.com        | facebook.com | facebook.com. |
+---------------------+--------------+---------------+

TXT records
+--------------+----------------------------------------------------------------------+
|    DOMAIN    |                             TXT RECORDS                              |
+--------------+----------------------------------------------------------------------+
| facebook.com | google-site-verification=A2WZWCNQHrGV_TWwKh6KHY90tY0SHZo_RnyMJoDaG0s |
+              +----------------------------------------------------------------------+
|              | v=spf1                                                               |
|              | redirect=_spf.facebook.com                                           |
+              +----------------------------------------------------------------------+
|              | google-site-verification=sK6uY9x7eaMoEMfn3OILqwTFYgaNp4llmguKI-C3_iA |
+              +----------------------------------------------------------------------+
|              | google-site-verification=wdH5DTJTc9AYNwVunSVFeK0hYDGUIEOGb-RReU6pJlY |
+--------------+----------------------------------------------------------------------+

IP Informations
+--------------+------------------------------------+------------------+------------------+------------------------+
|    DOMAIN    |                 IP                 | CITY AND COUNTRY |     LOCATION     |      ORGANIZATION      |
+--------------+------------------------------------+------------------+------------------+------------------------+
| facebook.com | 31.13.75.35                        | Hong             | 22.2783,114.1747 | AS32934 Facebook,      |
|              |                                    | Kong, HK         |                  | Inc.                   |
+              +------------------------------------+------------------+------------------+                        +
|              | 2a03:2880:f15a:83:face:b00c:0:25de | Dublin,          | 53.3331,-6.2489  |                        |
|              |                                    | IE               |                  |                        |
+--------------+------------------------------------+------------------+------------------+------------------------+

Name Servers
+--------------+--------------------+
|    DOMAIN    |    NAME SERVERS    |
+--------------+--------------------+
| facebook.com | b.ns.facebook.com. |
+              +--------------------+
|              | d.ns.facebook.com. |
+              +--------------------+
|              | a.ns.facebook.com. |
+              +--------------------+
|              | c.ns.facebook.com. |
+--------------+--------------------+

MX Records
+--------------+-----------------------------+
|    DOMAIN    |         MX RECORDS          |
+--------------+-----------------------------+
| facebook.com | smtpin.vvv.facebook.com.    |
|              | 10                          |
+--------------+-----------------------------+

Okkk! Thank you for reading 😍 🤩 🥳


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Duc Tran


Print Share Comment Cite Upload Translate Updates
APA

Duc Tran | Sciencx (2022-09-20T16:49:09+00:00) Simple tool check informations from domain name with golang. Retrieved from https://www.scien.cx/2022/09/20/simple-tool-check-informations-from-domain-name-with-golang/

MLA
" » Simple tool check informations from domain name with golang." Duc Tran | Sciencx - Tuesday September 20, 2022, https://www.scien.cx/2022/09/20/simple-tool-check-informations-from-domain-name-with-golang/
HARVARD
Duc Tran | Sciencx Tuesday September 20, 2022 » Simple tool check informations from domain name with golang., viewed ,<https://www.scien.cx/2022/09/20/simple-tool-check-informations-from-domain-name-with-golang/>
VANCOUVER
Duc Tran | Sciencx - » Simple tool check informations from domain name with golang. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/09/20/simple-tool-check-informations-from-domain-name-with-golang/
CHICAGO
" » Simple tool check informations from domain name with golang." Duc Tran | Sciencx - Accessed . https://www.scien.cx/2022/09/20/simple-tool-check-informations-from-domain-name-with-golang/
IEEE
" » Simple tool check informations from domain name with golang." Duc Tran | Sciencx [Online]. Available: https://www.scien.cx/2022/09/20/simple-tool-check-informations-from-domain-name-with-golang/. [Accessed: ]
rf:citation
» Simple tool check informations from domain name with golang | Duc Tran | Sciencx | https://www.scien.cx/2022/09/20/simple-tool-check-informations-from-domain-name-with-golang/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.