Skip to content

Instantly share code, notes, and snippets.

@alexpacini
Last active December 30, 2015 19:38
Show Gist options
  • Save alexpacini/6029371 to your computer and use it in GitHub Desktop.
Save alexpacini/6029371 to your computer and use it in GitHub Desktop.
Script to change your MAC address using macchanger: see http://pacinispace.blogspot.it/2012/01/chance-mac-address-in-sabayongentoo.html
read -p "Choose the interface: " iface
echo "Which MAC on $iface do you want?"
echo "1 - Set random vendor MAC of the same kind"
echo "2 - Set number1 MAC"
echo "3 - Set number2 MAC"
echo "0 - User defined MAC"
read -p "Do your choice: " choice
systemctl stop NetworkManager
case $choice in
[0]* ) read -p "Set the MAC XX:XX:XX:XX:XX:XX : " mac
macchanger --mac=$mac $iface;;
[1]* ) macchanger -a $iface;;
[2]* ) macchanger --mac=YY:YY:YY:YY:YY:YY $iface;;
[3]* ) macchanger --mac=YY:YY:YY:YY:YY:YY $iface;;
* ) echo "Please do a valid choice";;
esac
systemctl start NetworkManager
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment