Created
May 19, 2024 17:32
-
-
Save ppcamp/87781b7521e98fa3bb33c4d12a570abb to your computer and use it in GitHub Desktop.
MAC changer is a way to change the MAC address of your PC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ $# -lt 1 ];then | |
INTERFACE='enp2s0f0' | |
MAC='2C:76:8A:BB:D4:52' | |
else | |
INTERFACE=$1 | |
MAC=$2 | |
fi | |
sudo ifconfig $INTERFACE down & \ | |
sudo ifconfig $INTERFACE hw ether $MAC & \ | |
sudo ifconfig $INTERFACE up | |
printf "\033[1;32mMac changed sucessufuly! \033[0m \n" | |
echo "Current address: ${MAC}" | |
# ./macchanger.sh enp2s0f0 2C:76:8A:BB:D4:52 | |
# ./macchanger.sh enp2s0f0 B8:AE:ED:82:FF:80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment