A powerful, privacy-focused tool designed to automatically capture and save Telegram self-destructing (disappearing) photos and videos before they expire.
SecPhoto offers both a modern graphical desktop interface (PySide6) and a lightweight headless CLI, providing flexible monitoring across private chats, groups, and channels.
- ⚡ Automatic Real-Time Interception: Listens in the background and immediately captures disappearing media with TTL timers as soon as they arrive.
- 💬 Reply-to-Save: Missed an incoming self-destructing photo or video? Simply reply to the message in Telegram, and SecPhoto will capture and preserve it on demand.
- 📦 Grouped Album Support: Automatically detects and groups multi-item albums, preserving order and delivering them as cohesive albums with complete metadata.
- 🖥️ Modern Desktop GUI: Sleek PySide6 interface featuring:
- Interactive login with phone number, verification code, and 2FA password support.
- Live monitoring dashboard with one-click Start/Stop controls.
- Real-time statistics counters (Photos, Videos, and Albums captured).
- Visual media stream with sender information, timestamp badges, and quick links.
- Integrated live activity console with color-coded logs and instant clipboard copy.
- Instant Dark & Light Mode theme switching with persistent preferences.
- In-app proxy and storage settings configuration.
- 💻 Lightweight Headless CLI: Fast terminal-based execution ideal for low-resource environments, remote servers, or command-line workflows.
- 🔒 Local-First & Zero Telemetry: Operates strictly between your client and Telegram's official MTProto servers. No analytics, tracking, or remote servers.
- 🌐 SOCKS5 Proxy Ready: Built-in SOCKS5 proxy support (including Tor) for restricted networks.
- Python 3.8 or higher
- A Telegram account
- Telegram API credentials (
api_idandapi_hash)
Before running SecPhoto, you will need your own Telegram API credentials:
- Visit my.telegram.org in your web browser.
- Log in using your Telegram phone number (in international format, e.g.,
+1234567890). - Navigate to API Development Tools.
- Fill out the application form:
- App title: Choose any name (e.g.,
SecPhoto) - Short name: Choose a short identifier (e.g.,
secphoto) - Platform: Select
Desktop
- App title: Choose any name (e.g.,
- Click Create application.
- Copy your
api_id(numeric) andapi_hash(alphanumeric string).
Note: When using the Desktop GUI, you can enter your
api_idandapi_hashdirectly into the login screen without modifying any source files.
If you prefer not to install Python or manage dependencies manually, pre-built GUI packages for Windows and Linux are available directly on the GitHub Releases section. Simply download the latest release for your platform and launch it directly.
-
Clone the repository:
git clone https://github.com/Mr3rf1/SecPhoto.git cd SecPhoto -
Install dependencies:
pip install -r requirements.txt
Run SecPhoto in headless CLI mode on Android via Termux:
-
Update packages and install Python:
pkg update && pkg install python git -
Clone and install dependencies:
git clone https://github.com/Mr3rf1/SecPhoto.git cd SecPhoto pip install -r requirements.txt
SecPhoto provides two distinct interfaces to suit your workflow:
You can run the pre-built desktop application directly from GitHub Releases (for Windows and Linux), or launch it from source:
python gui/run_gui.py- Interactive Authentication: Log in directly with your phone number, receive verification codes, and authenticate with 2FA passwords seamlessly.
- Account Profiles: Switch between authenticated accounts or log in with fresh credentials at any time.
- Real-Time Dashboard:
- Click Start Monitoring to begin capturing disappearing media in real time.
- Track live statistics for captured photos, videos, and albums.
- Inspect incoming media cards displaying chat name, sender, date, time, and links.
- Theme Switching: Toggle between dark and light themes using the theme button in the top navigation bar.
- Settings Dialog: Configure proxy connections and delivery destinations with a single click.
Run the lightweight command-line interface directly in your terminal:
python SecPhoto.py| Option | Description | Example |
|---|---|---|
-p, --proxy IP:PORT |
Route traffic through a SOCKS5 proxy (e.g., Tor) | python SecPhoto.py -p 127.0.0.1:9050 |
-v, --version |
Display application version | python SecPhoto.py --version |
-help, --help |
Show available options and help banner | python SecPhoto.py --help |
- Automatic Monitoring: When monitoring is active, SecPhoto listens for incoming messages containing self-destructing (TTL) photos or videos across all active chats.
- Reply-to-Save Feature: If you miss a disappearing message before it is captured, simply reply to that message in Telegram. SecPhoto will detect the reply, download the original media, and save it.
- Saved Messages Delivery: Intercepted media is automatically forwarded to your Telegram "Saved Messages" chat, complete with a structured caption including:
- Origin Chat ID
- Sender Username
- Message ID
- Exact Timestamp
- Zero Telemetry: SecPhoto contains no remote telemetry, crash reporters, or analytics. Your activity is strictly between your machine and Telegram.
- Credential Protection: Never share your API credentials, phone verification codes, or authorization data with anyone.
- Safe Operation: SecPhoto operates non-intrusively. It does not alter, delete, or send unprompted messages in origin chats.
Ensure all required Python packages are installed:
pip install -r requirements.txtIf your account has Two-Step Verification enabled, both the GUI and CLI will prompt you for your 2FA password during sign-in. Enter your account password to complete authentication.
If you are operating behind a restricted network or firewall:
- In the GUI: Open Settings and enable the SOCKS5 proxy with your proxy host and port.
- In the CLI: Pass the
-pparameter (e.g.,python SecPhoto.py -p 127.0.0.1:9050).
This project is intended for personal and educational use. Please respect Telegram's Terms of Service and use responsibly.