Skip to content

Instantly share code, notes, and snippets.

@bl4ckb0ne
Created August 15, 2016 13:42
Show Gist options
  • Save bl4ckb0ne/5a774b751d528af20deeb06add481fec to your computer and use it in GitHub Desktop.
Save bl4ckb0ne/5a774b751d528af20deeb06add481fec to your computer and use it in GitHub Desktop.
FUCK YOU OUIBUS
#!/bin/sh
echo "Current MAC address"
MAC=`ip link show wlp2s0 | awk '/ether/ {print $2}'`
echo $MAC
MAC=`echo $MAC | cut -d: -f1-3`
echo "Building new MAC address"
for i in `seq 1 3`;
do
hex=`cat /dev/urandom| tr -cd 'a-f0-9' | fold -w 2 | head -n 1`
MAC="$MAC:$hex"
echo $MAC
done
sudo ip link set wlp2s0 down
sudo ip link set dev wlp2s0 address $MAC
sudo ip link set wlp2s0 up
echo "New MAC address in place"
MAC=`ip link show wlp2s0 | awk '/ether/ {print $2}'`
echo $MAC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment