mirror of
https://github.com/lord-alfred/ipranges.git
synced 2025-12-19 03:37:47 +00:00
12 lines
310 B
Bash
12 lines
310 B
Bash
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
set -x
|
|
|
|
# get ranges from telegram
|
|
curl -s https://core.telegram.org/resources/cidr.txt > /tmp/telegram.txt
|
|
|
|
# seperate IPv4 and IPv6, sort an uniq
|
|
grep -v ':' /tmp/telegram.txt | sort -V | uniq > telegram/ipv4.txt
|
|
grep ':' /tmp/telegram.txt | sort -V | uniq > telegram/ipv6.txt
|