mirror of
https://github.com/gaoyifan/china-operator-ip.git
synced 2025-12-16 06:13:15 +08:00
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:
committed by
Yifan Gao
parent
6682779fc6
commit
c74585c9f5
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user