configuration/local/bin/macspoofer.sh

10 lines
228 B
Bash
Raw Normal View History

2016-09-11 23:20:28 +02:00
#!/bin/sh
2024-08-02 11:37:09 +02:00
mac="${1:?Provide mac address as first argument}"
name="${2:-macvlan9000}"
enp="$(basename /sys/class/net/enp*)"
2024-08-02 11:37:09 +02:00
sudo ip link add link "$enp" address "$mac" name "$name" type macvlan
/bin/sh
sudo ip link del "$name"
2018-09-13 09:43:58 +02:00