I am running the following script in Platypus and getting errorsbut the MAC address does not change:
#!/bin/zsh
IF=en7
export PATH=”$PATH:/sbin:/usr/bin”
mac=`ifconfig $IF | grep ether | awk ‘'/ether/{print $2}’`'`
echo “$IF"$IF mac before change=$mac”change=$mac"
randmac=`openssl rand -hex 6 | sed ‘s's/\(..\)/\1:/g; s/.$//’`'`
sudo ifconfig $IF ether $randmac
mac=`ifconfig $IF | grep ether | awk ‘'/ether/{print $2}’`'`
echo “$IF"$IF mac after change=$mac”change=$mac"
Errors I receive:
/Applications/MAC Randomizer.app/Contents/Resources/script:6: command not found: grep
/Applications/MAC Randomizer.app/Contents/Resources/script:6: command not found: awk
“en7 mac before change=”
/Applications/MAC Randomizer.app/Contents/Resources/script:8: command not found: openssl
/Applications/MAC Randomizer.app/Contents/Resources/script:8: command not found: sed
/Applications/MAC Randomizer.app/Contents/Resources/script:8: no such file or directory: s/.$//\M-b\M-^@\M-^Y
/Applications/MAC RandomizerNot receiving errors anymore.app/Contents/Resources/script:9: command However, the MAC address is not found: sudo
/Applications/MAC Randomizerchanged by the script.app/Contents/Resources/script:10: command Commands work individually pasted into Terminal, but not found: grep
/Applications/MAC Randomizerexecuted as an application by Platypus.app/Contents/Resources/script:10: command not found: awk
“en7 mac after change=”
Platypus screenshot: