Re: A really fast traceroute script

From Gracious Iguana, 6 Years ago, written in Bash, viewed 766 times. This paste is a reply to A really fast traceroute script from NAT - view diff
URL https://code.nat.moe/view/880f862e Embed
Download Paste or View Raw
  1. #!/bin/bash
  2.  
  3. echo "[ * ] Traceing to $1... "
  4.  
  5. MAX=$(echo "64-$(ping -c1 $1 | tr " " "\n" | grep ttl | awk -F= '{print $2}')" | bc)
  6. STEP=0
  7. TEMP=.nrttmp
  8. echo "[ $(echo $MAX+1|bc) ] $1"> $TEMP
  9. echo "[ * ] Total $MAX Hopes, start trace..."
  10.  
  11. function lowttl_ping {
  12.         echo [ $2 ] $(ping -m$2 -t1 $1 | grep exceeded | awk -F" " '{print $4,$5}' | sed -e "s/://g" | sed -e "s/Time//g") #>> $TEMP
  13. }
  14.  
  15. while [[ $STEP != $MAX ]]
  16. do
  17.         STEP=$(echo $STEP+1|bc)
  18.         lowttl_ping $1 $STEP &
  19. done
  20.  
  21. sleep 2
  22. cat $TEMP | sort -n -k2

Replies to Re: A really fast traceroute script rss

Title Name Language When
Re: Re: A really fast traceroute script Cute Earthworm bash 2 Years ago.

Reply to "Re: A really fast traceroute script"

Here you can reply to the paste above

captcha