Is there a quick and easy way to dump the contents of a MacOS X keychain?

后端 未结 5 799
滥情空心
滥情空心 2021-01-30 17:13

I\'m looking for a way to dump (export) the contents of an OS X keychain into a file that I can easily process elsewhere, such as tab-delimited plaintext or something of the sor

5条回答
  •  死守一世寂寞
    2021-01-30 17:33

    Actually I was just looking for the same: Modified applescript from github somebody posted. To be run in ScriptEditor and must be allowed in Preferences & Security.

    set keychainPassword to "yourpasswordgoeshere"
    
    tell application "System Events"
        repeat while exists (processes where name is "SecurityAgent")
            tell process "SecurityAgent"
                delay 0.1
                try
                    set value of text field 1 of window 1 to keychainPassword
                    click button "Allow" of window 1
                end try
            end tell
        end repeat
    end tell
    

    You must click each window separetly in order to activate them. For that I used tool "murgaa auto clicker" I had known from runescape many years ago (http://www.murgaa.com/auto-clicker-mac/ seems still active). You just set shortcut for autoclicking (eg. Command+R) and set timer to 10ms and it works like charm.

提交回复
热议问题