Created
October 5, 2014 12:13
-
-
Save runjak/51d82aa971bdc15600e6 to your computer and use it in GitHub Desktop.
A simple script that helps me to manage my mac addresses.
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
#!/usr/bin/bash | |
# Inspired by https://wiki.archlinux.org/index.php/MAC_address_spoofing | |
eth="eth0" | |
wifi="wlan0" | |
case $1 in | |
old) | |
echo "Changing to your old macs:" | |
macchanger --mac=xx:xx:xx:xx:xx:xx $eth | |
macchanger --mac=xx:xx:xx:xx:xx:xx $wifi | |
;; | |
random) | |
echo "Changing to random macs:" | |
macchanger -r $eth | |
macchanger -r $wifi | |
;; | |
reset) | |
echo "Resetting our original macs:" | |
macchanger -p $eth | |
macchanger -p $wifi | |
;; | |
vendor) | |
echo "Changing to random vendor macs:" | |
macchanger -e $eth | |
macchanger -e $wifi | |
;; | |
*) | |
echo "Usage $0 [old|random|reset|vendor]" | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment