Last active
August 20, 2022 13:57
-
-
Save jacobsalmela/025d115774a00ad4d1fe to your computer and use it in GitHub Desktop.
(OS X) Enter the password repeatedly for multiple authentication windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Change 60 to however many passwords you have to authenticate for | |
for s in {1..60} | |
do | |
sleep 1 | |
# Enter your password below | |
osascript -e <<EOF 'tell application "System Events" | |
tell process "SecurityAgent" | |
set value of text field 1 of window 1 to "password" | |
end tell | |
tell application "system events" to keystroke return | |
end tell' | |
EOF | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment