SecPhoto
SecPhoto is a Python automation tool that monitors Telegram chats and automatically saves self-destructing photos and videos before they expire.
Install / Use
/learn @Mr3rf1/SecPhotoREADME
SecPhoto
A Python tool to save Telegram self-destructing photos and videos. This tool allows you to capture and save disappearing media from Telegram chats before they expire.
⚠️ Important Notice
Before using this tool, you MUST obtain your own Telegram API credentials. The current code contains hardcoded API credentials which should be replaced with your own for security and functionality reasons.
📋 Prerequisites
- Python 3.6 or higher
- A Telegram account
- Telegram API credentials (api_id and api_hash)
🔑 Getting Telegram API Credentials
Step 1: Create a Telegram Application
- Go to my.telegram.org
- Log in with your phone number (the same number you use for Telegram)
- Click on "API Development Tools"
Step 2: Create a New Application
- Fill out the form with the following information:
- App title: Choose any name (e.g., "SecPhoto Tool")
- Short name: Choose a short name (e.g., "secphoto")
- URL: Leave empty or add your website
- Platform: Choose "Desktop"
- Description: Brief description of your app
- Click "Create application"
Step 3: Get Your Credentials
After creating the application, you'll see:
- api_id: A numeric ID (e.g., 1234567)
- api_hash: A 32-character hash (e.g., "abcdef1234567890abcdef1234567890")
Step 4: Update the Code
- Open
SecPhoto.pyin a text editor - Find these lines (around line 11-12):
api_id = 1234567 api_hash = "82bd7b4562teujin24d18rfayt39b2d9352" - Replace them with your own credentials:
api_id = YOUR_API_ID_HERE api_hash = "YOUR_API_HASH_HERE"
🚀 Installation
For Windows/Linux/macOS
-
Clone the repository:
git clone https://github.com/Mr3rf1/SecPhoto cd SecPhoto -
Install Python dependencies:
pip install -r requirements.txtOr if you're using Python 3 specifically:
python3 -m pip install -r requirements.txt
For Termux (Android)
-
Update packages:
apt update && apt upgrade -
Install required packages:
pkg install python3 python3-pip git -
Clone and setup:
git clone https://github.com/Mr3rf1/SecPhoto cd SecPhoto python3 -m pip install -r requirements.txt
📖 Usage
Basic Usage
- Start the tool simply
python3 SecPhoto.py
Reply-to-Save Feature
The tool now supports a convenient reply-to-save feature:
- Automatic Detection: The tool automatically monitors all chats and saves self-destructing media as soon as it appears
- Reply Method: If you missed a self-destructing message, simply reply to it and the tool will save the media
- Works Everywhere: This feature works in all types of chats (private, groups, channels)
- Real-time Processing: Both automatic detection and reply-based saving happen in real-time
With Proxy (Tor/SOCKS5)
If you need to use a proxy:
python3 SecPhoto.py -p 127.0.0.1:9050
How It Works
- Run the command to start monitoring all chats
- The tool will automatically detect and save self-destructing media in real-time
- New Feature: You can also save self-destructing media by replying to any message containing such media
- The tool will automatically download and save the media
- The saved media will be sent to your "Saved Messages" in Telegram
Getting Help
To see all available options:
python3 SecPhoto.py --help
🔧 Command Line Options
| Option | Description | Example |
|--------|-------------|---------|
| -p, --proxy | SOCKS5 proxy (IP:PORT) | -p 127.0.0.1:9050 |
| --help | Show help message | --help |
📁 Dependencies
telethon- Telegram client librarycolorama- Colored terminal outputpysocks- SOCKS proxy support
⚡ Features
- ✅ Save self-destructing photos
- ✅ Save self-destructing videos
- ✅ Reply-to-save feature - Reply to any message to save its self-destructing media
- ✅ Real-time monitoring of all chats
- ✅ SOCKS5 proxy support
- ✅ Works with both usernames and numeric IDs
- ✅ Automatic delivery to Saved Messages
- ✅ Cross-platform compatibility
🛡️ Security Notes
- Keep your API credentials private and never share them
- The tool creates a session file (
secret.session) - keep this secure - Downloaded media is temporarily saved as
secret.jpgorsecret.mp4
🐛 Troubleshooting
"Please install dependencies" error
Make sure you've installed all requirements:
pip install -r requirements.txt
Authentication errors
- Verify your API credentials are correct
- Make sure you're using your own api_id and api_hash
- Delete the
secret.sessionfile and try again
Permission errors
Make sure the script has write permissions in the current directory.
📄 License
This project is for educational purposes. Please respect Telegram's Terms of Service and use responsibly.
👨💻 Author
Related Skills
qqbot-channel
342.5kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
claude-opus-4-5-migration
85.3kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
docs-writer
99.6k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
342.5kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
