Metadata-Version: 2.1
Name: imessage-reader
Version: 0.1.0
Summary: Fetch recipients and chat messages from the chat.db database.
Home-page: https://github.com/niftycode/imessage_reader
Author: Bodo Schönfeld
Author-email: bodo.schoenfeld@niftycode.de
License: MIT
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: openpyxl

# imessage_reader

![](img/license-MIT-green.svg) ![](img/python-3.8-blue.svg) ![](https://img.shields.io/github/last-commit/niftycode/imessage_reader.svg?style=flat) ![](https://img.shields.io/github/issues/niftycode/imessage_reader.svg?style=flat)

This is a forensic tool written in Python 3. Use this tool to fetch the content (phone numbers, email addresses and messages) from the *chat.db* database file on **macOS** (version 10.14 or above).

## Background

Received messages (iMessage or SMS) and attachments will be saved in "~/Library/Messages". This directory contains a "chat.db" file (SQLite3) with two tables of interest: *handle* and *message*. The *handle* table contains the recipients (email address or phone number). The received messages are in the *message* table.

## Note

Since the imessage databases are only available under macos, it makes no sense to use this tool under Windows or Linux.

## Requirements

* **Python 3.8+**
* openpyxl
* setuptools

## Install

    pip3 install imessage_reader

## Usage

Start the program with:

    imessage_reader

This will show you all users and messages.

Use

    imessage_reader.py -e

to create an Excel file containing users and messages. The file will be stored in the Desktop folder.

**Note**: You need access to the *Library* folder in order to read the iMessage database file ("chat.db"). You can add access (for *Terminal* or *iTerm*) in

    > System Preferences > Security & Privacy > Privacy > Full Disk Access

## ToDo

* Get the date of messages
* Fetch the date of received messages.
* Show a list of all known recipients.
* Did the user receive the message via SMS or via iMessage?
* Show attachments.
* Add more tests.

## Changelog

see [CHANGELOG.rst](https://github.com/niftycode/imessage_reader/blob/master/CHANGELOG.rst)


