configuration/local/bin/macspoofer.sh

12 lines
270 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")"
2016-10-22 17:53:42 +02:00
link="$(basename /sys/class/net/enp*)"
2016-09-11 23:20:28 +02:00
# Setting the MAC address for our wired
2016-10-21 10:34:10 +02:00
sudo ip link set "$link" down
sudo ip link set "$link" address "$mac"
sudo ip link set "$link" up