Advertisement
Guest User

Untitled

a guest
Feb 19th, 2015
1,697
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.64 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #changing mac address to random
  4.  
  5. # Disable the network devices
  6. ifconfig eth0 down
  7. ifconfig wlan0 down
  8.  
  9. # Spoof the mac addresses
  10. /usr/bin/macchanger -r eth0
  11. /usr/bin/macchanger -r wlan0
  12.  
  13. # Re-enable the devices
  14. ifconfig eth0 up
  15. ifconfig wlan0 up
  16.  
  17. #changing hostname to random word from dictionary
  18.  
  19. FILE=/usr/share/dict/words
  20. WORD=$(sort -R $FILE | head -1)
  21.  
  22. printf%s\nChanging Hostname…\n”
  23. OLDHOST=$(hostname)
  24. hostname $WORD
  25. if [ $? == 0 ]; then
  26. printf%sPrevius Hostname: $OLDHOST \n”
  27. printf%sRandom Hostname: $WORD \n”
  28. else
  29. printf%sScript encounter an error, sorry…\n”
  30. exit 1
  31. fi
  32.  
  33. #END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement