1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00

initial commit of code

This commit is contained in:
Stefan Pratter
2018-11-08 19:45:21 +00:00
parent 5d7c69de38
commit 0edf47bbfb
370 changed files with 47054 additions and 16 deletions

45
scripts/rdap_getent.sh Executable file
View File

@@ -0,0 +1,45 @@
#!/bin/bash
function die_usage
{
echo usage $0 RIR HANDLE
exit 1
}
case "$1" in
'afrnic')
url=https://rdap.afrinic.net/rdap/entity/
;;
'apnic')
url=https://rdap.apnic.net/entity/
;;
'arin')
url=https://rdap.arin.net/
;;
'lacnic')
echo Lacnic needs to be done by hand since it redirects again
exit 1
;;
'ripe')
url=https://rdap.db.ripe.net/entity/
;;
*)
die_usage
;;
esac
shift
if test -z "$1"; then
die_usage
fi
for handle in $@; do
curl $url/$handle > tests/data/rdap/entity/${handle}.input
done