> ## Content Index
> Fetch the complete content index at: https://darkwebinformer.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Asnmap: Go CLI and Library for quickly mapping organization network ranges using ASN information
- URL: https://darkwebinformer.com/asnmap-go-cli-and-library-for-quickly-mapping-organization-network-ranges-using-asn-information-2/
- Published: 2025-08-05T18:28:43.000Z
- Updated: 2025-09-04T22:20:41.000Z
- Author: Dark Web Informer
- Tags: Tools

---

GitHub: <https://github.com/projectdiscovery/asnmap>

---

`asnmap` is a fast and flexible tool by ProjectDiscovery to look up ASN and CIDR ranges from a wide variety of input formats — IPs, domains, organizations, or ASNs. Perfect for OSINT, threat recon, or attack surface mapping.

---

## ✨ Key Features

- ASN → CIDR lookup
- ORG → CIDR lookup
- DNS → CIDR lookup
- IP → CIDR lookup
- Supports input via ASN/DNS/IP/ORG
- JSON, CSV, and plain text output formats
- STDIN and STDOUT support for chaining
- Built-in support for piping into tools like `naabu`, `httpx`, `dnsx`, `tlsx`, `nuclei`

---

## ⚙️ Installation

Requires **Go 1.21+**

bashCopyEditgo install github.com/projectdiscovery/asnmap/cmd/asnmap@latest  

Or download binaries from the [release page](https://github.com/projectdiscovery/asnmap/releases).

---

## 🧪 Example Usage

bashCopyEditasnmap -h  

### Input Examples

bashCopyEditasnmap -a AS45596 -silent  
asnmap -i 100.19.12.21 -silent  
asnmap -d hackerone.com -silent  
asnmap -org GOOGLE -silent  

You can also pipe input directly:

bashCopyEdit`echo` GOOGLE | ./asnmap -silent  

---

## 🔐 Authentication

`asnmap` uses the ProjectDiscovery Cloud Platform and requires an API key.

### Using Environment Variable

bashCopyEdit`export` PDCP\_API\_KEY=your\_api\_key  

### Using Interactive Auth

bashCopyEditasnmap -auth  

---

## 📤 Output Options

- `-json`: JSON output
- `-csv`: CSV output
- `-o <file>`: Save results to file
- `-silent`: Clean output
- `-v6`: Show IPv6 CIDRs
- `-verbose`: Debug/verbose output

---

## 📦 Output Example

### CIDR (Default Output)

bashCopyEdit8.8.4.0/24  
8.8.8.0/24  

### JSON Output

jsonCopyEdit`{  
 "timestamp": "...",  
 "input": "hackerone.com",  
 "as_number": "AS13335",  
 "as_name": "CLOUDFLARENET",  
 "as_country": "US",  
 "as_range": [  
 "104.16.0.0/14",  
 "104.20.0.0/16"  
 ]  
}`  

### CSV Output

swiftCopyEdit`timestamp|input|as_number|as_name|as_country|`as\_range  
`2022-09-19|hackerone.com|AS13335|CLOUDFLARENET|US|104.16.0.0/14,104.20.0.0/16`  

---

## 🔁 Chaining with Other Tools

`asnmap` supports seamless piping into other ProjectDiscovery tools:

bashCopyEdit`echo AS54115 | asnmap | naabu -p 443 | httpx | nuclei -id` tech-detect  

---

## 📚 Library Usage

You can import `asnmap` directly into your Go projects. See [examples](https://github.com/projectdiscovery/asnmap/tree/main/examples) for implementation details.

---

## 🙏 Acknowledgments

Thanks to **Frank Denis** for maintaining the open IP→ASN database used by `asnmap`.