ASN(1)
π ASN(1) β User Commands, bestie edition
okay so first of all, this is a User Commands manual page, and it's page 1 of the manual, which is the section for user commands. iykyk. it's called asn and it's literally the moment. π¦
β¨ NAME β¨
asn β ASN / RPKI validity / BGP stats / IPv4v6 / Prefix / ASPath / Organization / IP reputation lookup tool
no cap, that's a whole lot of jobs for one little command and she ate every single one. π
πΈ SYNOPSIS πΈ
asn [OPTIONS] [TARGET]
asn [-v] -l [SERVER OPTIONS]
π DESCRIPTION π
ASN is a tool for performing various lookup operations related to ASN (Autonomous System Number), RPKI validity, BGP statistics, IPv4/v6 addresses, prefixes, ASPaths, organizations, and IP reputations.
that's the whole vibe: you give it a thing, it tells you everything about the thing. main character energy fr fr. β¨
π OPTIONS π
-tβ (enable trace) β Turn on AS path trace to the TARGET. this is literally the default behavior, so it's giving "just confirming the vibe" π-nβ (no trace | no additional INETNUM lookups) β Disable tracing the AS path to the TARGET (for IP targets), or Disable additional (unannounced / announced by other AS) INETNUM lookups for the TARGET (for AS targets). it's the off-switch for the tracing, depending on what kind of target you handed her.-dβ (detailed) β Output detailed hop info during the AS path trace to the TARGET. This option also enables RPKI validation/BGP hijacking detection for every hop. every hop gets the full report card bestie π«Ά-aβ (ASN Suggest) β Lookup AS names and numbers matching TARGET. it's giving autocomplete but for autonomous systems.-uβ (Transit/Upstream lookup) β Inspect BGP updates and ASPATHs for the TARGET address/prefix and identify possible transit/upstream autonomous systems. who's upstream? we're finding out. π₯-cβ (Country CIDR) β Lookup all IPv4/v6 CIDR blocks allocated to the TARGET country.-gβ (Bulk Geolocate) β Geolocate all IPv4/v6 addresses passed as TARGET. This mode supports multiple targets, stdin input and IP extraction from input, e.g.
asn -g < /var/log/apache2/error.log or echo 1.1.1.1 2.2.2.2 | asn -g
-sβ (Shodan scan) β Query Shodan's InternetDB for CVE/CPE/Tags/Ports/Hostnames data about TARGET. This mode supports multiple targets and stdin input, e.g.
asn -s < iplist or echo 1.1.1.0/24 google.com | asn -s
-oβ (organization search) β Force TARGET to be treated as an Organization Name.-mβ (monochrome output) β Disable colored output. no rainbow bestie, we're going plain π-vβ (verbose) β Enable (and log to$HOME/asndebug.log) debug messages (URLs being queried and variable names being assigned). API call response data (i.e. the JSON output) is logged to the logfile. she's telling you EVERYTHING. the whole tea. π-jβ (compact JSON output) β Set output to compact JSON mode (ideal for machine parsing).-Jβ (pretty-printed JSON output) β Set output to pretty-printed JSON mode. same data, better outfit π-hβ (help) β Show this help screen.-lβ (lookup server) β Launch the script in server mode. See SERVER OPTIONS below.
π¦ TARGET π¦
<AS Number>β Lookup matching ASN and BGP announcements/neighbours data.<IPv4/IPv6>β Lookup matchingroute(4/6), IP reputation, and ASN data.<Prefix>β Lookup matching ASN data.<host.name.tld>β Lookup matching IP, route, and ASN data. Supports multiple IPs β e.g. DNS RR.<URL>β Extract hostname/IP from the URL and lookup relative data. Supports any protocol prefix, non-standard ports, and prepended credentials.<Organization Name>β Search by company name and lookup network ranges exported by (or related to) the company.
π SERVER OPTIONS π
BIND_ADDRESSβ IP address (v4/v6) to bind the listening server to (e.g.,asn -l 0.0.0.0). Default value:127.0.0.1(IPv4) or::1(IPv6).BIND_PORTβ TCP Port to bind the listening server to (e.g.,asn -l 12345). Default value:49200.BIND_ADDRESS BIND_PORTβ IP address and port to bind the listening server to (e.g.,asn -l ::1 12345).-vβ (verbose) β Enable verbose output and debug messages in server mode.--allow host[,host,...]β Allow only given hosts to connect to the server.--allowfile fileβ A file of hosts allowed to connect to the server.--deny host[,host,...]β Deny given hosts from connecting to the server.--denyfile fileβ A file of hosts denied from connecting to the server.-m,--max-conns <n>β The maximum number of simultaneous connections accepted by the server.100is the default.
π NOTES π
Every option in server mode (after -l) is passed directly to the ncat listener. Refer to man ncat for more details on the available commands.
Unless specified, the default IP:PORT values of 127.0.0.1:49200 (for IPv4) or [::1]:49200 (for IPv6) will be used (e.g., asn -l).
fr fr, she's just handing your flags straight to ncat. know what you're passing down the line bestie. π§
β EXAMPLES β
Example server usage:
asn -l (starts server on default IP(v4/v6):PORT)
asn -l 0.0.0.0 --allow 192.168.0.0/24,192.168.1.0/24,192.168.2.245
(binds to all available IPv4 interfaces on the default port, allowing
only connections from the three specified subnets)
asn -l :: 2222 --allow 2001:DB8::/32 (binds to all available IPv6
interfaces on port 2222, allowing only connections from the specified
prefix)
asn -v -l 0.0.0.0 --allowfile ~/goodips.txt -m 5 (verbose mode, bind to
all IPv4 interfaces, use an allowfile with allowed addresses, accept a
maximum of 5 concurrent connections)
π SEE ALSO π
To file a bug report or feature request, please open an issue on the project homepage: https://github.com/nitefood/asn
π AUTHOR π
Project author: nitefood <nitefood0@gmail.com>
This manpage was created by Marcos Rodrigues de Carvalho (aka oday) <marcosrcarvalho42@gmail.com>
and that's the whole page bestie π this is version 0.77.0, dated July 2024, straight from the User Commands section of the manual β go forth and look up every ASN you can find, periodt. πβ¨
π¦ where this page comes from
- debian trixie: asn 0.78.0-1 Β· MIT
- ubuntu questing: asn 0.78.0-1
- ubuntu resolute: asn 0.78.0-1build1 Β· MIT
- ubuntu stonking: asn 0.78.0-1build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms