configuration/local/bin/macspoofer.sh
Felix Van der Jeugt 4bc4e5b8ad several updates
2024-08-02 12:02:01 +02:00

10 lines
228 B
Bash
Executable File

#!/bin/sh
mac="${1:?Provide mac address as first argument}"
name="${2:-macvlan9000}"
enp="$(basename /sys/class/net/enp*)"
sudo ip link add link "$enp" address "$mac" name "$name" type macvlan
/bin/sh
sudo ip link del "$name"