1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 18:17:52 -05:00
v2fly/tools/chinaip/ip_gen.sh

5 lines
200 B
Bash
Raw Normal View History

2015-12-08 11:31:31 -05:00
#!/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