1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 10:08:15 -05:00
v2fly/tools/chinaip/ip_gen.sh
Darien Raymond c19341ffab chinaip
2015-12-08 16:31:31 +00:00

5 lines
200 B
Bash
Executable File

#!/bin/bash
APNIC_FILE="http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest"
curl "${APNIC_FILE}" | grep ipv4 | grep CN | awk -F\| '{ printf("%s/%d\n", $4, 32-log($5)/log(2)) }' > ipv4.txt