Skip to content

Instantly share code, notes, and snippets.

@Johand-alt
Created December 9, 2020 17:40
Show Gist options
  • Save Johand-alt/5ba4996cf82c2992bab82b29f5db970b to your computer and use it in GitHub Desktop.
Save Johand-alt/5ba4996cf82c2992bab82b29f5db970b to your computer and use it in GitHub Desktop.
Icloud Keychain export (Mac OS big sur)
tell application "TextEdit"
activate
tell application "System Events" to keystroke "name,login_username,login_uri,login_password"
tell application "System Events" to keystroke return
end tell
repeat 1 times
tell application "Keychain Access"
activate
tell application "System Events" to keystroke "i" using command down
delay 0.4
tell application "System Events" to keystroke "c" using command down
end tell
tell application "TextEdit"
activate
delay 0.4
tell application "System Events" to keystroke "v" using command down
tell application "System Events" to keystroke ","
end tell
tell application "Keychain Access"
activate
delay 0.4
tell application "System Events" to key code 48
tell application "System Events" to key code 48
tell application "System Events" to keystroke "c" using command down
end tell
tell application "TextEdit"
activate
delay 0.4
tell application "System Events" to keystroke "v" using command down
tell application "System Events" to keystroke ","
end tell
tell application "Keychain Access"
activate
delay 0.4
tell application "System Events" to key code 48
tell application "System Events" to keystroke "c" using command down
end tell
tell application "TextEdit"
activate
delay 0.4
tell application "System Events" to keystroke "v" using command down
tell application "System Events" to keystroke ","
end tell
tell application "Keychain Access"
activate
delay 0.4
tell application "System Events" to keystroke "c" using {shift down, command down}
delay 0.4
tell application "System Events" to keystroke "YOUR PASSWORD"
tell application "System Events" to keystroke return
delay 0.4
end tell
tell application "TextEdit"
activate
delay 0.4
tell application "System Events" to keystroke "v" using command down
tell application "System Events" to keystroke return
end tell
tell application "Keychain Access"
activate
delay 0.4
tell application "System Events" to keystroke "w" using command down
end tell
tell application "Keychain Access"
activate
delay 0.4
tell application "System Events" to key code 125
end tell
end repeat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment