Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Allright, I'm stupid. There's a command-line tool called <code>security</code> that does just this (and lots of other actions on keychains).</p> <p>An example usage:</p> <pre><code>security dump-keychain -d login.keychain </code></pre> <p>This will dump all the data in the login.keychain (the default keychain for a user) as plaintext, including the passwords. You <strong>still</strong> have to confirm access , but only once for each key, and it's much faster than (and doesn't throw weird errors when trying to access certain fields) using AppleScript. And it's no hack.</p> <p>Without the <code>-d</code> option, it will dump all the fields except for the password.</p> <p>The dumped data for a key looks like this (for an internet key; program keys and certificates have other fields, but the format is the same):</p> <pre><code>keychain: "/Users/&lt;username&gt;/Library/Keychains/login.keychain" class: "inet" attributes: 0x00000007 &lt;blob&gt;="tech.slashdot.org (&lt;username for this web login&gt;)" 0x00000008 &lt;blob&gt;=&lt;NULL&gt; "acct"&lt;blob&gt;="&lt;username for this web login&gt;" "atyp"&lt;blob&gt;="form" "cdat"&lt;timedate&gt;=0x32303038303432333038323730355A00 "20080423082705Z\000" "crtr"&lt;uint32&gt;=&lt;NULL&gt; "cusi"&lt;sint32&gt;=&lt;NULL&gt; "desc"&lt;blob&gt;="Kennwort des Web-Formulars" "icmt"&lt;blob&gt;="default" "invi"&lt;sint32&gt;=&lt;NULL&gt; "mdat"&lt;timedate&gt;=0x32303038303432333038323730355A00 "20080423082705Z\000" "nega"&lt;sint32&gt;=&lt;NULL&gt; "path"&lt;blob&gt;=&lt;NULL&gt; "port"&lt;uint32&gt;=0x00000000 "prot"&lt;blob&gt;=&lt;NULL&gt; "ptcl"&lt;uint32&gt;="http" "scrp"&lt;sint32&gt;=&lt;NULL&gt; "sdmn"&lt;blob&gt;=&lt;NULL&gt; "srvr"&lt;blob&gt;="tech.slashdot.org" "type"&lt;uint32&gt;=&lt;NULL&gt; data: "&lt;the plaintext password for this key&gt;" </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload