Skip to main content
4 of 4
Changed script based on feedback.

Randomize MAC Address Using Platypus

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:

Platypus screenshot