Yum Install Jwhois-y wget ftp://ftp.bitwizard.nl/mtr/mtr-0.80.tar.gz TAR-AXF mtr-0.80.tar.gz-c/usr/local/src/ cd/usr/local/src/mtr-0.80/ ./configure--prefix=/usr/local/mtr Make Make install Ln-s/usr/local/mtr/sbin/mtr/usr/sbin/ Cat >/root/geotrace.sh<<\eof #!/bin/bash Echo Traceroute to [$] from localhost Ip=$1 Echo # # # #for Linux # # # displays detailed geo-location information #echo---- Show detailed geo-location information ---- #mtr--n--report $ip |grep-v snt|grep "%" |awk ' {printf "%-18s%-10s", NR ")" $ "," delay["$" s] "; System ("Whois" $ "|grep-e netname-e descr|head-n1|cut-c17-");p rintf "\ n"} ' # # # Displays abbreviated geo-location information The echo----displays a snapshot of the location information --- Echo-e "\033[40;33;1m Hop number IP delay carrier \033[0m" MTR--n--report $ip |grep-v snt|grep "%" |awk ' {printf "%-18s%-10s", NR ")" $ "," delay["$" s] "; System ("Whois" $ "|grep descr|head-n1|cut-c17-");p rintf "\ n"} ' # # #for Mac # # # displays detailed geo-location information #echo---- Show detailed geo-location information ---- #mtr--n--report $ip |grep-ve "snt| Start "|awk ' {printf"%-18s%-10s ", NR") "$", "dleay[" $6 "]"; System ("Whois" $ "|grep-e netname-e descr|cut- c17-");p rintf" \ n "} ' # # # Displays abbreviated geo-location information #echo---- show a brief geographic location --- #mtr--n--report $ip |grep-ve "snt| Start "|awk ' {printf"%-18s%-10s ", NR") "$", "dleay[" $6 "]"; System ("Whois" $ "|grep descr|head-n1|cut-c17-"); printf "\ n"} ' Eof |