configuration/local/bin/macspoofer.sh

17 lines
354 B
Bash
Raw Normal View History

2016-09-11 23:20:28 +02:00
#!/bin/sh
# Reading our private mac
here="$(dirname "$0")"
mac="$(cat "$here/macaddress")"
enp="$(basename /sys/class/net/enp*)"
wlp="$(basename /sys/class/net/wlp*)"
2016-09-11 23:20:28 +02:00
# Setting the MAC address for our wired
sudo ip link set "$enp" down
sudo ip link set "$enp" address "$mac"
sudo ip link set "$enp" up
# No more wireless
sudo ip link set "$wlp" down