From 7e9b3cd2caefd15551e46c7911b6902516fed777 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Sat, 22 Oct 2016 17:53:42 +0200 Subject: [PATCH] thanks @procrat --- local/bin/macspoofer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/bin/macspoofer.sh b/local/bin/macspoofer.sh index ba3466f..49d5a5c 100755 --- a/local/bin/macspoofer.sh +++ b/local/bin/macspoofer.sh @@ -3,7 +3,7 @@ # Reading our private mac here="$(dirname "$0")" mac="$(cat "$here/macaddress")" -link="$(ip link | grep enp | tr -d ' ' | cut -d: -f2)" +link="$(basename /sys/class/net/enp*)" # Setting the MAC address for our wired sudo ip link set "$link" down