tankdthedruid

genmac.sh

Jan 26th, 2012
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.32 KB | None | 0 0
  1. # ~/development/scripts/genmac.sh
  2.  
  3. # Test for root permissions and terminate
  4. if [[ $EUID -ne 0 ]]; then
  5.    echo "This script must be run as root" 1>&2
  6.        exit 1
  7. fi
  8.  
  9. if [ $INT = "" ]; then
  10.     echo ERROR: No interface specified.
  11.             exit 1
  12. fi
  13.  
  14. ifconfig $1 down
  15. macchanger -A $1
  16. ifconfig $1 up
  17.  
  18.  
  19. # EOF
Advertisement
Add Comment
Please, Sign In to add comment