Script targets-asn

Script types: prerule
Categories: discovery, external, safe
Download: https://svn.nmap.org/nmap/scripts/targets-asn.nse

Script Summary

Produces a list of IP prefixes for a given routing AS number (ASN).

This script uses a whois server database operated by the Shadowserver Foundation. We thank them for granting us permission to use this in Nmap.

Output is in CIDR notation.

http://www.shadowserver.org/wiki/pmwiki.php/Services/IP-BGP

Script Arguments

targets-asn.whois_port

The whois port to use. Default: 43.

targets-asn.whois_server

The whois server to use. Default: asn.shadowserver.org.

targets-asn.asn

The ASN to search.

max-newtargets, newtargets

See the documentation for the target library.

Example Usage

nmap --script targets-asn --script-args targets-asn.asn=32

Script Output

Pre-scan script results:
| targets-asn:
|   32
|     128.12.0.0/16
|_    171.64.0.0/14

Requires


Author:

  • John R. Bond

License: Simplified (2-clause) BSD license--See https://nmap.org/svn/docs/licenses/BSD-simplified