requires stoken
Very basic and naive, not sure how to capture the vpn dialog window so we use a sleep
👍
Hint, PIN aka $1
could be included into function risking some security.. not much though.
¯\_(ツ)_/¯
vpn(){
if [ -z $1 ]; then
echo "Usage: vpn [PIN]"
return 128
else
scutil --nc start "GoDaddy Corp VPN"
password=`echo $1|stoken|grep '^\d'|tr -d '\n'`
sleep 2
osascript -e "tell application \"System Events\" to keystroke \"$password\""
osascript -e "tell application \"System Events\" to keystroke return"
fi
}