grayratio icon indicating copy to clipboard operation
grayratio copied to clipboard

match IDs against address book for named output

Open mroth opened this issue 9 years ago • 0 comments

It appears the Address Book is stored in a predictable location on an OS X system and isn't encrypted.

The location is $HOME/Library/Application Support/AddressBook/AddressBook-v22.abcddb.

Unfortunately the format is a big of a mess. We'd need to pull ZFIRSTNAME and ZLASTNAME from ZABCDRECORD, and join that against the ZACDPHONENUMBER table. The much larger problem is that the phone numbers don't appear to be stored in a normalized way, rather they are however the user entered them, so they may or may not have dashes, dots, spaces, +1 country code prefixes, area codes in parens.. basically any way a human might write a phone number.

Because of that, we can't simply query against that table via sqlite, would probably have to suck the entire table out, do some sort of transformation in memory to normalize and build a hash table, and then query against that instead.

mroth avatar Oct 30 '14 16:10 mroth