|
1 |
| -# msgintel |
| 1 | +# msgIntel |
| 2 | + |
| 3 | +msgIntel reads, correlates, searches, and extracts data between all databases used by the Messages desktop application. |
| 4 | + |
| 5 | +## |
| 6 | + |
| 7 | +### Features |
| 8 | + |
| 9 | +- Extract recent messages and associated metadata |
| 10 | +- Retrieve contact information and nicknames |
| 11 | +- Access collaboration notices and handle sharing preferences |
| 12 | +- Analyze communication patterns and social networks |
| 13 | +- Search messages for specific keywords or topics |
| 14 | +- Generate reports and visualizations of communication data |
| 15 | + |
| 16 | +## |
| 17 | + |
| 18 | +### Database Locations |
| 19 | +```javascript |
| 20 | + /Users/${USER}/Library/Messages/chat.db |
| 21 | + /Users/${USER}/Library/Messages/NickNameCache/nickNameKeyStore.db |
| 22 | + /Users/${USER}/Library/Messages/NickNameCache/handleSharingPreferences.db |
| 23 | + /Users/${USER}/Library/Messages/CollaborationNoticeCache/collaborationNotices.db |
| 24 | +``` |
| 25 | + |
| 26 | +## |
| 27 | + |
| 28 | +### Usage |
| 29 | + |
| 30 | +```bash |
| 31 | +$ osascript -l JavaScript ./msgIntel.js [options] [arguments...] |
| 32 | + |
| 33 | +DISCOVER: |
| 34 | + -messages List recent messages |
| 35 | + -chats List all chats |
| 36 | + -drafts List all drafts |
| 37 | + -handles List all contacts/handles |
| 38 | + -attachments List message attachments |
| 39 | + -threads List message threads |
| 40 | + -deleted List deleted messages |
| 41 | + -spam List spam messages |
| 42 | + -sensitive List sensitive content |
| 43 | + |
| 44 | +TIME-BASED: |
| 45 | + -last <days> Show messages from last N days |
| 46 | + -since <timestamp> Show messages since timestamp |
| 47 | + -between <start> <end> Show messages between timestamps |
| 48 | + |
| 49 | +SEARCH: |
| 50 | + -text <query> Search message text |
| 51 | + -sender <id> Search by sender |
| 52 | + -service <type> Search by service type (iMessage, SMS) |
| 53 | + -type <type> Search by attachment type |
| 54 | + |
| 55 | +DEBUG: |
| 56 | + -debug Enable debug output |
| 57 | + -schema Show database schema |
| 58 | + -pragma Show PRAGMA information |
| 59 | + -help Display this help message |
| 60 | +``` |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | +### Limitations |
| 65 | +- Requires Full Disk Access or |
| 66 | +- Database schema changes between macOS versions may break queries |
| 67 | +- Message attachments require additional permissions |
| 68 | +- Max query batch limit: 100 messages |
| 69 | + |
| 70 | +## |
| 71 | + |
| 72 | +### References |
| 73 | +- macOS Messages Framework |
| 74 | +- JXA Development Guide |
| 75 | + |
0 commit comments