User Tools

Site Tools


Get the whole list:


Parse it with the following script:

grep DK.ipv4 delegated-ripencc-latest | awk -F'|' -vOFS=/ '{print $4,32- log($5)/log(2)}' | while read network; do whois --verbose -h -T route -x $network >>danske_netblokke 2>&1; sleep 2; done

Now extract the IP subents:

cat danske_netblokke |grep route: | cut -d: -f2| sed 's/[[:space:]]//g'

One-liner for DK:

curl --silent |grep -Eo  '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/([0-9]|[1-3][0-9])'| column -c 280

Change the resource=xx to the country you would like to extract (

The last part “column -c 280” can be excluded to get the list in one row.

indexes/get_all_danish_ip_subenets.txt · Last modified: d/m/Y H:i by domingo