mirror of
https://github.com/gaoyifan/china-operator-ip.git
synced 2025-07-14 13:22:27 +08:00
use dockerized bgpdump and cidrmerge
This commit is contained in:
parent
acf4b7f6ac
commit
0dfd939514
@ -26,7 +26,7 @@ get_asn(){
|
||||
prepare_data(){
|
||||
wget http://bgp.potaroo.net/as1221/asnames.txt
|
||||
wget http://archive.routeviews.org/dnszones/rib.bz2
|
||||
bgpdump -m -O rib.txt rib.bz2
|
||||
docker run -it --rm -v `pwd`:/bgpdump -w /bgpdump gaoyifan/bgpdump bgpdump -m -O rib.txt rib.bz2
|
||||
}
|
||||
set -e
|
||||
[[ $DEBUG != true ]] && prepare_data
|
||||
@ -35,5 +35,5 @@ find operator -type f -name '*.conf' |
|
||||
while read file; do
|
||||
operator=${file%.*}
|
||||
operator=${operator##*/}
|
||||
get_asn $file | xargs bgptools | uniq > result/$operator.txt
|
||||
get_asn $file | xargs bgptools | docker run -i --rm gaoyifan/cidrmerge > result/$operator.txt
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user