Skip to content

Instantly share code, notes, and snippets.

@Alex4386
Created November 1, 2019 11:25
Show Gist options
  • Save Alex4386/2e60c4f26de27d7351ab68a81252f53c to your computer and use it in GitHub Desktop.
Save Alex4386/2e60c4f26de27d7351ab68a81252f53c to your computer and use it in GitHub Desktop.
The MAC Address Changer
#!/bin/bash
echo "The Mac Changer"
echo
echo "Copyright (c) Alex4386, Distributed under HRPL"
read -p "Type Interface you want to change: " interface
read -p "Type Mac Address you want to change: " mac
echo
echo Backing up your previous mac
ifconfig $interface | grep ether > mac_bak.txt
echo Backup is now available at mac_bak.txt
echo
sudo ifconfig $interface ether $mac
sudo ifconfig $interface down
sudo ifconfig $interface up
echo Done!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment