diff options
| author | Sam Nystrom <sam@samnystrom.dev> | 2026-01-15 22:34:35 -0500 |
|---|---|---|
| committer | Sam Nystrom <sam@samnystrom.dev> | 2026-01-15 22:34:35 -0500 |
| commit | c40794b2040330ec2625bedf7df961115680c08b (patch) | |
| tree | 4ff1d4fda76d5d59d5d3604a015cc474438ab470 /bin/macspoof | |
| parent | 8fdacc55625a04f94d3e364d53aeec84bc93f6be (diff) | |
update bin
Diffstat (limited to 'bin/macspoof')
| -rwxr-xr-x | bin/macspoof | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/macspoof b/bin/macspoof new file mode 100755 index 0000000..eab9888 --- /dev/null +++ b/bin/macspoof @@ -0,0 +1,11 @@ +#!/bin/sh -e + +dev="wlan0" + +prefix="$(ip link show "$dev" | awk '/link\/ether/ {print substr($2, 0, 8)}')" +suffix="$(hexdump -n3 -e'3/1 "%02x:""\n"' /dev/urandom | cut -d: -f1-3)" +address="$prefix:$suffix" + +ip link set "$dev" down +ip link set "$dev" address "$address" +ip link set "$dev" up |
