add ipv6 list (#12)

* change asname source

* change rib source

* generate for ipv6

* fix typo

* update travis data

* change docker image

* delete duplicate lines before merge cidr

* change rib source

* change style of upstream

* modify arg for uniq

* change some conf files to symlink

* update stat

* add sudo for apt in travis config

* add stat for 0

* fix bug for stat

* set -x

* curl -vv

* change dist to bionic

* remove verbose options
This commit is contained in:
Zhaofeng Yang (楊肇峰)
2019-12-19 14:39:16 +08:00
committed by Yifan Gao
parent 6682779fc6
commit c74585c9f5
12 changed files with 58 additions and 14 deletions

View File

@@ -20,9 +20,14 @@ get_asn(){
}
prepare_data(){
curl -sSLo asnames.txt http://bgp.potaroo.net/as1221/asnames.txt
curl -sSL https://bgp.potaroo.net/cidr/autnums.html | awk '-F[<>]' '{print $3,$5}' | grep '^AS' > asnames.txt
curl -sSLo rib.bz2 http://archive.routeviews.org/dnszones/rib.bz2
IP6UPSTREAM="http://archive.routeviews.org/route-views6/bgpdata"
MONTH6=$(lftp -e 'cls -1;exit' $IP6UPSTREAM 2>/dev/null | sort | tail -n 1)
LATEST6=$(lftp -e 'cls -1;exit' $IP6UPSTREAM/$MONTH6/RIBS/ 2>/dev/null | sort | tail -n 1)
curl -sSLo rib6.bz2 "$IP6UPSTREAM/$MONTH6/RIBS/$LATEST6"
log_info "runing bgpdump ..."
docker run -it --rm -v `pwd`:/bgpdump -w /bgpdump gaoyifan/bgpdump bgpdump -m -O rib.txt rib.bz2
docker run -it --rm -v `pwd`:/bgpdump -w /bgpdump gaoyifan/bgpdump bgpdump -m -O rib6.txt rib6.bz2
log_info "done"
}