Read a "secure note" by command line
Now, I would like to read them by CLI, via SSH. But I struggle to do this.
The best I can do is a partial dump of my keychain, by using :
_
$ security dump-keychain
...
keychain: "/Users/LOGIN/Library/Keychains/login.keychain"
class: "genp"
attributes:
0x00000007 <blob>="NAME OF THE NOTE"
0x00000008 <blob>=<NULL>
"acct"<blob>=<NULL>
"cdat"<timedate>=0x32303038303330343233313035325A00 "20080304231052Z\000"
"crtr"<uint32>=<NULL>
"cusi"<sint32>=<NULL>
"desc"<blob>=0x6E6F74652073C3A96375726973C3A965 "note s\303\251curis\303\251e"
"gena"<blob>=<NULL>
"icmt"<blob>=<NULL>
"invi"<sint32>=<NULL>
"mdat"<timedate>=0x32303038303332343139303535355A00 "20080324190555Z\000"
"nega"<sint32>=<NULL>
"prot"<blob>=<NULL>
"scrp"<sint32>=<NULL>
"svce"<blob>="NAME OF THE NOTE"
"type"<uint32>="note"
...
_
So I can see the notes' data structure, but not the content. Idealy, I am looking for something that could dump on stdout the content of a given note, something like :
_
$ getnote.sh "My private note"
used password: **************
blablabla
content of the secure note
blablabla
_
Do you have any idea how to do this?
iMac blanc 24", Mac OS X (10.5.6), Système français avec X11