# Rat Trap Activity Alarm

Free Software by PentaSec Solutions LLC

Copyright © 2026 PentaSec Solutions LLC. All rights reserved.

Rat Trap Activity Alarm is a lightweight, local-only tamper monitor for Windows. When armed, it watches for mouse or keyboard activity, opens a local alert, and requires the configured passcode to disarm.

The app is intended for devices you own or administer. It is not stealth software, does not install startup persistence, and does not upload data.

## Running The Packaged App

1. Open the `RatTrapActivityAlarm` folder from the Windows distribution.
2. Run `RatTrapActivityAlarm.exe`.
3. On first launch, set your own local passcode when prompted.
4. Use Settings to configure timing, alert behavior, and optional camera snapshot settings.
5. Click `ARM SYSTEM` to arm the local activity alarm.

## Privacy And Local Storage

Logs, reports, and optional camera snapshots are stored locally beside the app in `./activity-logs`.

Each user sets their own passcode on first launch. The distribution ZIP does not include saved passcodes, user settings, logs, reports, snapshots, or other user data.

Incident reports are saved locally in `./activity-logs/reports` when exported from the app.

Camera snapshots are disabled by default. If enabled, snapshots are saved locally in `./activity-logs/snapshots`. Snapshots are not uploaded, emailed, hidden, or captured repeatedly.

The app does not upload data, log keystrokes, record typed content, take screenshots, monitor app names, capture browser URLs, read clipboard content, collect document names, log process names, or transmit activity. It only records minimal app-owned events such as armed, triggered by mouse/keyboard activity, passcode failure count, disarmed, countdown expired, and local report/snapshot status.

## Camera Snapshot Note

Only enable camera snapshots on a device you own or administer and where users are informed.

Use Detect Cameras to probe camera indexes `0` through `5`, and Test Camera to confirm the selected camera can open and return a usable frame. Test Camera does not save an image.

On Windows, the automatic camera backend tries DirectShow, Media Foundation, and then the default OpenCV backend. Snapshot capture warms up the camera, samples multiple frames, and rejects blank frames before saving.

## Antivirus Reputation Note

Fresh unsigned PyInstaller builds may be flagged by antivirus reputation systems because they are new, unsigned executables. Users should only run builds from a trusted source.

## Development

Python 3.12 is the recommended Windows development runtime for this project. The app uses Tkinter plus a small set of local dependencies listed in `requirements.txt`.

Create a Python 3.12 virtual environment in the project root:

```powershell
py -3.12 -m venv .venv
.\.venv\Scripts\activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python app.py
```

## Build Instructions

The Windows distribution build uses PyInstaller, the project icon `rat_trap_icon.ico`, and executable metadata from `version_info.txt`.

From the project root, run:

```bat
build_dist.bat
```

The script:

- activates `.venv`
- installs packages from `requirements.txt`
- verifies `tkinter`, `pynput`, `cv2`, and `PIL`
- removes old build artifacts
- builds `app.py` with PyInstaller using `--onedir`
- applies Windows version metadata
- copies this README into the dist folder
- creates `RatTrapActivityAlarm-Windows.zip`

Build outputs:

- `dist/RatTrapActivityAlarm/`
- `RatTrapActivityAlarm-Windows.zip`
