From a4fd979196dee88e6b02f1ce5bf4cbfc44874672 Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Sat, 14 Jan 2017 18:32:03 +0100 Subject: Cleanup. --- har2kml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/har2kml b/har2kml index 5c3c5f2..174a1e8 100755 --- a/har2kml +++ b/har2kml @@ -3,10 +3,19 @@ # Use geotraceroute to fetch traceroutes to all hosts used to view a web page and print KML # output for all traces. +usage() { + cat < +EOF +} + +gtrnode=4 + if [ "$1" ]; then har="$1" else - har=har-data/https\:%%www.politi.no.har + usage + exit 1 fi har2hosts() { @@ -19,7 +28,7 @@ if [ ! -d cache ] ; then mkdir cache ; fi for h in $(har2hosts) ; do kml="cache/$h.kml" if [ ! -f "$kml" ] ; then - curl -s "https://www.geotraceroute.com/petter.php?host=$h" > "$kml" + curl -s "https://www.geotraceroute.com/petter.php?node=$gtrnode&host=$h" > "$kml" fi kmls="$kmls $kml" done -- cgit v1.2.3