I am running the following script in Platypus but the MAC address does not change:
#!/bin/zsh
IF=en7
mac=`ifconfig $IF | awk '/ether/{print $2}'`
echo "$IF mac before change=$mac"
randmac=`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`
sudo ifconfig $IF ether $randmac
mac=`ifconfig $IF | awk '/ether/{print $2}'`
echo "$IF mac after change=$mac"
Not receiving errors anymore. However, the MAC address is not changed by the script. Commands work individually pasted into Terminal, but not executed as an application by Platypus.
Platypus screenshot:
grep |
whenifconfig $IF | awk '/ether/{print $2}'
does both.