Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #changing mac address to random
- # Disable the network devices
- ifconfig eth0 down
- ifconfig wlan0 down
- # Spoof the mac addresses
- /usr/bin/macchanger -r eth0
- /usr/bin/macchanger -r wlan0
- # Re-enable the devices
- ifconfig eth0 up
- ifconfig wlan0 up
- #changing hostname to random word from dictionary
- FILE=/usr/share/dict/words
- WORD=$(sort -R $FILE | head -1)
- printf “%s\nChanging Hostname…\n”
- OLDHOST=$(hostname)
- hostname $WORD
- if [ $? == 0 ]; then
- printf “%sPrevius Hostname: $OLDHOST \n”
- printf “%sRandom Hostname: $WORD \n”
- else
- printf “%sScript encounter an error, sorry…\n”
- exit 1
- fi
- #END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement