Advertisement
Guest User

DNS spoof detector

a guest
Aug 19th, 2010
434
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.35 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. # Written by kenkeiras
  3.  
  4. if [ "$2" == "" ]
  5.     then
  6.         echo "$0 <dirección a resolver> <DNS>"
  7.         exit 1
  8.     fi
  9.  
  10.  
  11. echo -n "Velocidad: ";((time ping -c 1 "$2" >> /dev/null) 2>> /dev/stdout )|head -n 2|tail -n 1|cut -f2
  12. echo -n "DNS: ";((time nslookup "$1" "$2" >> /dev/null) 2>> /dev/stdout )|head -n 2|tail -n 1|cut -f2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement