Skip to content

Instantly share code, notes, and snippets.

@nathan818fr
Last active August 16, 2018 10:52
Show Gist options
  • Save nathan818fr/5bd738118d4790c8b41d045675a69138 to your computer and use it in GitHub Desktop.
Save nathan818fr/5bd738118d4790c8b41d045675a69138 to your computer and use it in GitHub Desktop.
List ANDORRA TELECOM IP blocks.

L'organisation RIPE d'Andorra Telecom possède l'ID ORG-SdTd1-RIPE. On peut le vérifier avec la commande:

$ whois -h whois.ripe.net -- '-T organisation ORG-SdTd1-RIPE' | grep '^org-name:'
org-name:       ANDORRA TELECOM SAU

On récupère son ASN:

$ whois -h whois.ripe.net -- '-T aut-num -i org ORG-SdTd1-RIPE' | grep '^aut-num:' | awk '{print $2}'
AS6752

Puis on liste l'ensemble des blocs d'IP (v4 & v6) provenant de cet AS:

$ whois -h whois.ripe.net -- '-T route -i origin AS6752' | grep '^route:' | awk '{print $2}'
109.111.100.0/22
109.111.104.0/22
109.111.108.0/22
109.111.112.0/22
109.111.116.0/22
109.111.120.0/22
109.111.124.0/22
109.111.96.0/19
109.111.96.0/22
185.33.0.0/22
185.4.52.0/22
185.87.36.0/22
185.87.40.0/21
185.87.40.0/22
185.87.44.0/22
194.158.64.0/19
194.158.64.0/22
194.158.68.0/22
194.158.72.0/22
194.158.76.0/22
194.158.80.0/22
194.158.84.0/22
194.158.88.0/22
194.158.92.0/22
194.158.95.224/27
46.172.224.0/19
80.80.84.0/22
80.80.92.0/22
85.94.160.0/19
85.94.160.0/22
85.94.164.0/22
85.94.168.0/22
85.94.172.0/22
85.94.176.0/22
85.94.180.0/22
85.94.184.0/22
85.94.188.0/22
91.187.64.0/19
91.187.64.0/22
91.187.68.0/22
91.187.72.0/22
91.187.76.0/22
91.187.80.0/22
91.187.84.0/22
91.187.88.0/22
91.187.92.0/22
$ whois -h whois.ripe.net -- '-T route6 -i origin AS6752' | grep '^route6:' | awk '{print $2}'
2a02:8060::/31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment