Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

thatmattlove/whodat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

whodat


Quickly get IP, Prefix, and ASN Information at the command-line.

GitHub Workflow Status

Usage

Download the latest release

There are multiple builds of the release, for different CPU architectures/platforms:

There are multiple builds of the release, for different CPU architectures/platforms. Download and unpack the release for your platform:

wget <release url>
tar xvfz <release file> whodat

Run the binary

$ ./whodat --help

whodat
  Quickly get IP, Prefix, and ASN Information at the command-line.

Options:

  -h, --help               Show this Help Menu
  -p, --prefixes[=false]   Get ASN's Advertised Prefixes

IP Lookup

To query a single host IP, simply:

whodat 1.1.1.1

  1.1.1.1 (one.one.one.one)

    APNIC and Cloudflare DNS Resolver project
    AS13335

    Prefix: 1.1.1.0/24 (APNIC-LABS)
    Allocation: 1.1.1.0/24
    RIR: APNIC

Prefix Lookup

To query a prefix:

whodat 1.1.1.0/24

  1.1.1.0/24 (APNIC-LABS)

    APNIC and Cloudflare DNS Resolver project

    Origins:
      13335 (Cloudflare, Inc.)

    Allocation: 1.1.1.0/24
    RIR: APNIC

ASN Lookup

To query an ASN:

whodat AS13335 # or whodat 13335

  13335 (Cloudflare, Inc.)

    Website: https://www.cloudflare.com

You can also add the -p flag to get all of the ASN's originated prefixes, courtesy of bgpstuff.net by @mellowdrifter:

whodat AS13335 -p

  13335 (Cloudflare, Inc.)

    Website: https://www.cloudflare.com
    Prefixes:
      IPv4:
        1.0.0.0/24
        1.1.1.0/24
        103.21.244.0/24
        ...
      IPv6:
        2400:cb00:100::/48
        2400:cb00:102::/48
        2400:cb00:103::/48
        ...

About whodat & Credits

whodat is nothing more than a wrapper around services other people have created. whodat fetches data from the following sources:

Most of the data is fetched from a serverless function (see whodat server), which is what does the actual querying of each of the above resources. The data is cached at the server level to reduce load on those services and improve response times.

GitHub

About

Quickly get IP, Prefix, and ASN Information at the command-line.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages