From c51318f26ac70c16d455134938714ef74f1534bc Mon Sep 17 00:00:00 2001 From: Benjamin Collet Date: Mon, 31 Jan 2022 14:45:58 +0100 Subject: [PATCH] Initial commit --- get_prefixes.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 get_prefixes.sh diff --git a/get_prefixes.sh b/get_prefixes.sh new file mode 100755 index 0000000..9105231 --- /dev/null +++ b/get_prefixes.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +curl -s https://ftp.ripe.net/ripe/stats/delegated-ripencc-extended-latest | awk -F "|" '$3 == "ipv4" && $7 ~ /(reserved|available)/ && $5 >= 256 { printf "%-20s\t%s\n", $4 "/" int(32-log($5)/log(2)), $7 }' > $(dirname -- "${BASH_SOURCE[0]}")/ipv4_available_reserved.txt