rodrwan

cmac

Apr 18th, 2012
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.34 KB | None | 0 0
  1. #!/bin/bash
  2. # Clone Mac
  3. # by Rodrigo Fuenzalida
  4. #
  5. # parametro $1 = interfaz de red
  6. # parametro $2 = mac a clonar
  7.  
  8. echo "Cambiando Mac"
  9.  
  10. ifconfig $1 down
  11. sleep 2
  12. ifconfig $1 hw ether $2
  13. sleep 2
  14. ifconfig $1 up
  15.  
  16. echo "Mac Cambiada"
  17. echo "Renovando ip"
  18. /etc/init.d/networking restart
  19. sleep 1
  20. ifconfig $1
Advertisement
Add Comment
Please, Sign In to add comment