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.31k stars 159 forks source link

upstream/transit #63

Closed SimonSchmitz closed 5 months ago

SimonSchmitz commented 5 months ago

Each lookup is acknowledged with the error "/usr/bin/asn: line 2770: printf: 32.98889175923534: invalid number"

`asn -u 1.1.1.1

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

╭───────────────────────────────────────────────────╮ │ Recently observed upstream/transit AS for 1.1.1.1 │ ╰───────────────────────────────────────────────────╯

Legend: ██ most likely transit ( very large / Tier 1 upstream AS ) ██ very likely transit ( >= 85% BGP updates from this AS ) ██ likely transit ( >= 75% BGP updates from this AS ) ██ potentially transit ( >= 65% BGP updates from this AS ) ██ unlikely transit ( < 65% BGP updates from this AS )

Target : 1.1.1.1 (matching prefix: 1.1.1.0/24) Origin AS : [AS13335] CLOUDFLARENET, US CAIDA AS rank: #78 TOP 100 AS

/usr/bin/asn: line 2770: printf: 32.98889175923534: invalid number ██ AS2914 ( 32,00%) - NTT-LTD-2914, US /usr/bin/asn: line 2770: printf: 31.95556703694136: invalid number ██ AS24482 ( 31,00%) - SGGS-AS-AP SG.GS, SG /usr/bin/asn: line 2770: printf: 31.077241022991476: invalid number ██ AS1031 ( 31,00%) - PEER-1-INTERNET, US /usr/bin/asn: line 2770: printf: 0.7491604236631362: invalid number ██ AS7195 ( 0,00%) - EDGEUNO SAS, CO /usr/bin/asn: line 2770: printf: 0.41332988891759237: invalid number ██ AS37468 ( 0,00%) - ANGOLA-CABLES, AO /usr/bin/asn: line 2770: printf: 0.3874967708602428: invalid number ██ AS12779 ( 0,00%) - ITGATE, IT /usr/bin/asn: line 2770: printf: 0.3358305347455438: invalid number ██ AS3257 ( 0,00%) - GTT-BACKBONE GTT, US`

nitefood commented 5 months ago

Hey @SimonSchmitz,

could be a shell locale issue. What's the output of bash -c 'locale' ?

In order to confirm that is the issue, try making sure your BASH shell uses a correct numeric locale that recognizes . as part of numbers, e.g. by adding export LC_NUMERIC="en_US.UTF-8" to your .bashrc or .bash_profile.

Thanks for reporting!