1
1
Fork
You've already forked aslookup
0
tool for getting ASN, IP blocks and contact information for a given IP or domain
  • C 100%
2025年12月03日 09:14:38 +01:00
.github/workflows Delete .github/workflows/Win.yml 2025年12月02日 11:20:30 +01:00
aslookup.c Add aslookup.c 2025年12月02日 13:57:32 +01:00
aslookup.c.old Update aslookup.c.old 2025年12月02日 13:56:29 +01:00
LICENSE Revise LICENSE with new copyright and permissions 2025年10月23日 09:47:53 +02:00
README.md Update README.md 2025年12月03日 09:14:38 +01:00
sample-output.jpg Add files via upload 2025年10月22日 09:56:46 +02:00

aslookup

aslookup is a C program that performs Autonomous System Number (ASN) lookup for a given IP address or domain. It uses raw DNS queries to Team Cymru's ASN mapping service to retrieve ASN information, then securely fetches associated IP ranges from HackerTarget using HTTPS via libcurl and contactinformation using ripes whois database.

Features

  • Raw DNS query to Team Cymru to resolve ASN from IP address
  • Correctly parses TXT DNS records to extract full ASN (including leading digits)
  • Secure HTTPS request to HackerTarget ASN lookup API using libcurl
  • Displays IP ranges and organization details for the ASN
  • Displays contact information on the found ASN
  • Fully self-contained: no external tools like whois, dig, or curl required

Installation

Prerequisites

  • GCC compiler
  • libcurl development library
  • libjcon development library
  • libc6 development library

Install libcurl libjcon-dev libc6-dev (Debian/Ubuntu)

sudo apt-get install libcurl4-openssl-dev libc6-dev

Compile

gcc aslookup.c -o aslookup -lcurl -lcjson -lresolv

Usage

aslookup <options>
Options:
 -i <IP[,IP,...]> Specify one or more IP addresses (comma-separated)
 -d <domain[,domain,...]> Specify one or more domain names (comma-separated)
 -f <file> Save output to a formatted text file
 --help Show this help message
 --version Show installed version
 --ghversion Show latest GitHub release version

Example output:

screenshot

Releases

There are releases for Ubuntu and Arch Install with:

Ubuntu:

sudo dpkg -i aslookup_<version>_amd64.deb

Arch:

sudo pacman -U aslookup-<version>-x86_64.pkg.tar.zst

Arch Linux Users

If you find this package useful, please consider voting for it on the AUR!
More votes help increase visibility and the chance for inclusion in official Arch repositories.

To vote, log in to the AUR website and click the "Vote" button on the package page.

You can find and vote for this package on the AUR page

Thank you for your support!

License

This project is licensed under the BSD Zero Clause License. See the LICENSE file for details.

Author

Niel Nielsen