nitefood / asn

ASN / RPKI validity / BGP stats / IPv4v6 / Prefix / URL / ASPath / Organization / IP reputation / IP geolocation / IP fingerprinting / Network recon / lookup API server / Web traceroute server
MIT License
1.33k stars 161 forks source link

AS 45609 - parse error: Invalid numeric literal at line 1, column 7 #11

Closed Strykar closed 2 years ago

Strykar commented 3 years ago

This ASN has a large number of prefixes and I'm trying to get a list of just the IPv6's. When I add an IP Reputation token, it's still running for over 30 mins on a 50 Mbit FTTH uplink.

$ asn 45609

────────────────────────────────────────────────────────────
            WARNING 

No IPQualityScore token found, so disabling in-depth threat 
analysis and IP reputation lookups. Please visit 
https://github.com/nitefood/asn#ip-reputation-api-token 
for instructions on how to enable it. 
────────────────────────────────────────────────────────────

╭──────────────────────╮
│ ASN lookup for 45609 │
╰──────────────────────╯

 AS Number     ──> 45609
 AS Name       ──> BHARTI-MOBILITY-AS-AP Bharti Airtel Ltd. AS for GPRS Service, IN
 Organization  ──> Bharti Airtel Limited
 AS Reg. date  ──> 2017-08-10 02:29:43
 Peering @IXPs ──>  NONE 

╭─────────────────────────────────────────────────────────────────────────────────────────────────╮
│ BGP informations for AS45609 (BHARTI-MOBILITY-AS-AP Bharti Airtel Ltd. AS for GPRS Service, IN) │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯

Retrieving BGP data for AS45609 (BHARTI-MOBILITY-AS-AP Bharti Airtel Ltd. AS for GPRS Service, IN) (press CTRL-C to cancel)...parse error: Invalid numeric literal at line 1, column 7
parse error: Invalid numeric literal at line 1, column 7
parse error: Invalid numeric literal at line 1, column 7
Retrieving prefix allocations and announcements for AS45609 (BHARTI-MOBILITY-AS-AP Bharti Airtel Ltd. AS for GPRS Service, IN) (press CTRL-C to cancel)...^CInterrupted by signal 2...
nitefood commented 3 years ago

Those parse errors are from the RIPEStat API, most likely gateway timeout errors from the API endpoint. I am afraid there is little to do when the endpoint times out, except for either notifying RIPE about it (and asking them to beef up their resources), or merely using a different source.

Regarding your specific need, I tried your search and (after the same timeout you are experiencing), I got the following output:

╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Announced prefixes (aggregated) for AS45609 (BHARTI-MOBILITY-AS-AP Bharti Airtel Ltd. AS for GPRS Service, IN) │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

───── IPv4 ─────

106.0.0.0/8
110.224.0.0/14
117.96.0.0/14
125.16.0.0/13
171.48.0.0/12
171.76.0.0/14
182.0.0.0/8
223.176.0.0/12
223.224.0.0/12
27.56.0.0/13
59.144.0.0/15

───── IPv6 ─────

2401:4900::/32

Which looks accurately aggregated, after quickly glancing at their announced /48 prefixes. If you're looking for the individual prefixes, I guess you can try the RIPEstat UI directly from the web. Their new beta UI also conveniently separates them between IPv4 and IPv6. Try here ("announced prefixes" widget).

Strykar commented 3 years ago

Thanks for the beta ripestat link, looking good. Should I close this then, could we have asn print timeout errors when they occur?

nitefood commented 3 years ago

Leave it open, I will add some timeout handling and close the issue as soon as I get around to doing it. Thanks for the feedback!