Skip to content

batmanpriv/TeleHunt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TeleHunt Banner

TeleHunt πŸš€

Advanced Telegram Tool for Downloading, Forwarding, Link Finding, and More

Python Telethon License



πŸ“Œ Features

  • πŸ” Account Management - Add and manage multiple Telegram accounts
  • πŸ“₯ Smart Download - Download from direct links, Telegram channels, private chats, and batch files
  • πŸ“€ Forward Messages - Forward messages between channels/users with delay control
  • πŸ”— Link Finder - Extract and filter links by domain from all messages
  • πŸ”Œ Proxy Support - SOCKS4/SOCKS5/HTTP proxy with authentication
  • πŸ“Š Statistics - Track download speed, system resources, and network usage
  • πŸ”„ Resume Support - Resume interrupted downloads
  • πŸ“‹ List Dialogs - List groups, channels, bots, and DMs
  • πŸ” Search Messages - Advanced message search with filters
  • πŸ“Έ Capture Messages - Capture all messages from a specific user
  • 🎨 Beautiful UI - Colored output with progress bars and tables

πŸ“¦ Installation

Requirements

  • Python 3.8 or higher
  • pip (Python package manager)

Install Dependencies

# Clone repository
git clone https://github.com/batmanpriv/TeleHunt.git
cd TeleHunt

# Install required modules
pip install telethon colorama tabulate aiohttp aiofiles aiohttp-socks PySocks tqdm psutil

Quick Install with requirements.txt

pip install -r requirements.txt

πŸš€ Quick Start

# Show help
python TeleHunt.py --help

# Add your first account
python TeleHunt.py --add "api_hash:api_id:phone_number"

# Show all accounts
python TeleHunt.py --show

# Download from channel
python TeleHunt.py --download --accounts 1 --sources "@channel_name" --limit 5

πŸ“š Full Command Reference

πŸ” Account Management

Command Description Example
--add Add new account python TeleHunt.py --add "abc123:12345:+989123456789"
--show Show all accounts python TeleHunt.py --show
--accounts Select account(s) python TeleHunt.py --accounts 1,2

πŸ“₯ Download Features

Command Description Example
--download Start download python TeleHunt.py --download --accounts 1 --sources "https://example.com/file.zip"
--sources Sources to download python TeleHunt.py --download --accounts 1 --sources "https://file1.zip,https://file2.pdf"
--sources @channel Download from channel python TeleHunt.py --download --accounts 1 --sources "@channel_name" --limit 10
--ids Download specific messages python TeleHunt.py --download --accounts 1 --sources "@channel" --ids 123,456,789
--sources private link Download from private chat python TeleHunt.py --download --accounts 1 --sources "https://t.me/c/2531141208/279"
--range Download message range python TeleHunt.py --download --accounts 1 --sources "@channel" --range 100-200
--category Organize downloads python TeleHunt.py --download --accounts 1 --sources "@channel" --category videos --limit 5
--sources file Download from file list python TeleHunt.py --download --accounts 1 --sources "links.txt"
--stats Show download stats python TeleHunt.py --download --accounts 1 --sources "file.zip" --stats

Working Examples:

# Download a single file
python TeleHunt.py --download --accounts 1 --sources "https://example.com/file.zip"

# Download multiple files
python TeleHunt.py --download --accounts 1 --sources "https://example.com/file1.zip,https://example.com/file2.pdf"

# Download last 10 messages from a channel
python TeleHunt.py --download --accounts 1 --sources "@Telegram" --limit 10

# Download specific messages by ID
python TeleHunt.py --download --accounts 1 --sources "@channel" --ids 1001,1002,1003

# Download from private channel
python TeleHunt.py --download --accounts 1 --sources "https://t.me/c/2531141208/279"

# Download with category
python TeleHunt.py --download --accounts 1 --sources "@channel" --category videos --limit 5

# Download all links from a text file
python TeleHunt.py --download --accounts 1 --sources "download_links.txt"

# Download and show stats
python TeleHunt.py --download --accounts 1 --sources "https://example.com/bigfile.zip" --stats

πŸ“€ Forward Features

Command Description Example
--forward Enable forward mode python TeleHunt.py --forward --accounts 1 --from "@source" --to "@target" --limit 10
--from Source channel python TeleHunt.py --forward --accounts 1 --from "@channel" --to "@user" --limit 5
--to Target (user ID or username) python TeleHunt.py --forward --accounts 1 --from "@channel" --to 123456789 --limit 5
--delay Delay between forwards python TeleHunt.py --forward --accounts 1 --from "@channel" --to "@user" --delay 2

Working Examples:

# Forward 10 messages to user
python TeleHunt.py --forward --accounts 1 --from "@channel_name" --to "@target_user" --limit 10

# Forward to user ID with delay
python TeleHunt.py --forward --accounts 1 --from "@channel_name" --to 123456789 --limit 5 --delay 2

# Forward 20 messages with 3-second delay
python TeleHunt.py --forward --accounts 1 --from "@source_channel" --to "@dest_channel" --limit 20 --delay 3

# Forward without delay (fast mode)
python TeleHunt.py --forward --accounts 1 --from "@channel" --to "@user" --limit 30 --delay 0

πŸ”— Link Finder

Command Description Example
--links Find links in messages python TeleHunt.py --links --accounts 1
--domains Filter by domains python TeleHunt.py --links --accounts 1 --domains "github.com,youtube.com"
--limit Max messages to scan python TeleHunt.py --links --accounts all --limit 1000
--table Show results as table python TeleHunt.py --links --accounts 1 --table

Working Examples:

# Find all links
python TeleHunt.py --links --accounts 1

# Find links from specific domains
python TeleHunt.py --links --accounts 1 --domains "github.com,gitlab.com,bitbucket.org"

# Find YouTube links only
python TeleHunt.py --links --accounts 1 --domains "youtube.com,youtu.be"

# Find links with higher limit
python TeleHunt.py --links --accounts 1 --limit 2000

# Find links from all accounts
python TeleHunt.py --links --accounts all --limit 1000

# Show results in table format
python TeleHunt.py --links --accounts 1 --table

# Find links from specific domains with table
python TeleHunt.py --links --accounts 1 --domains "github.com" --table

πŸ”Œ Proxy Features

Command Description Example
--proxy Set proxy python TeleHunt.py --proxy socks5 127.0.0.1 1080
--proxy-user Proxy username python TeleHunt.py --proxy socks5 127.0.0.1 1080 --proxy-user user
--proxy-pass Proxy password python TeleHunt.py --proxy socks5 127.0.0.1 1080 --proxy-pass pass
--proxy-show Show current proxy python TeleHunt.py --proxy-show
--proxy-clear Clear proxy python TeleHunt.py --proxy-clear

Working Examples:

# Set SOCKS5 proxy
python TeleHunt.py --proxy socks5 127.0.0.1 1080

# Set SOCKS5 with authentication
python TeleHunt.py --proxy socks5 192.168.1.100 1080 --proxy-user myuser --proxy-pass mypass

# Set HTTP proxy
python TeleHunt.py --proxy http 192.168.1.100 8080

# Set SOCKS4 proxy
python TeleHunt.py --proxy socks4 127.0.0.1 1080

# Show current proxy
python TeleHunt.py --proxy-show

# Clear proxy settings
python TeleHunt.py --proxy-clear

πŸ“Š Statistics & History

Command Description Example
--download-stats Show download stats python TeleHunt.py --download-stats
--show-stats Show system stats python TeleHunt.py --show-stats
--download-history Show download history python TeleHunt.py --download-history

Working Examples:

# Show download statistics
python TeleHunt.py --download-stats

# Show full system stats (CPU, RAM, Network)
python TeleHunt.py --show-stats

# Show download history
python TeleHunt.py --download-history

# Show last 10 downloads
python TeleHunt.py --download-history --limit 10

πŸ”„ Resume Features

Command Description Example
--resume-check Check partial downloads python TeleHunt.py --resume-check
--resume-clear Clear partial downloads python TeleHunt.py --resume-clear

Working Examples:

# Check for partial downloads
python TeleHunt.py --resume-check

# Clear all partial downloads
python TeleHunt.py --resume-clear

πŸ” Search Features

Command Description Example
--search Search messages python TeleHunt.py --search --accounts 1 --text "hello"
--text Text to search python TeleHunt.py --search --accounts 1 --text "hello" --limit 10
--exact Exact match python TeleHunt.py --search --accounts 1 --text "hello" --exact
--keywords Keywords filter python TeleHunt.py --search --accounts 1 --keywords "python,telegram"
--exclude Exclude keywords python TeleHunt.py --search --accounts 1 --text "hello" --exclude "spam"
--type Message type filter python TeleHunt.py --search --accounts 1 --type photo
--has-media Only with media python TeleHunt.py --search --accounts 1 --text "hello" --has-media
--no-media Only without media python TeleHunt.py --search --accounts 1 --text "hello" --no-media
--date-from Start date python TeleHunt.py --search --accounts 1 --text "hello" --date-from 2024-01-01
--date-to End date python TeleHunt.py --search --accounts 1 --text "hello" --date-to 2024-12-31
--sender Sender filter python TeleHunt.py --search --accounts 1 --sender "@username"

Working Examples:

# Search for text
python TeleHunt.py --search --accounts 1 --text "hello" --limit 10

# Search exact match
python TeleHunt.py --search --accounts 1 --text "hello world" --exact

# Search with keywords
python TeleHunt.py --search --accounts 1 --keywords "python,telegram,bot" --limit 5

# Search and exclude keywords
python TeleHunt.py --search --accounts 1 --text "hello" --exclude "spam,ad"

# Search by date range
python TeleHunt.py --search --accounts 1 --text "hello" --date-from 2024-01-01 --date-to 2024-12-31

# Search only messages with media
python TeleHunt.py --search --accounts 1 --text "hello" --has-media

# Search specific message type
python TeleHunt.py --search --accounts 1 --type photo
python TeleHunt.py --search --accounts 1 --type video
python TeleHunt.py --search --accounts 1 --type pdf

# Search from specific sender
python TeleHunt.py --search --accounts 1 --sender "@username" --limit 20

# Show results in table
python TeleHunt.py --search --accounts 1 --text "hello" --table

πŸ“‹ List Features

Command Description Example
--list List dialogs python TeleHunt.py --list all --accounts 1
--table Show as table python TeleHunt.py --list all --accounts 1 --table

Working Examples:

# List all dialogs
python TeleHunt.py --list all --accounts 1

# List groups only
python TeleHunt.py --list groups --accounts 1

# List channels only
python TeleHunt.py --list channels --accounts 1

# List bots only
python TeleHunt.py --list bots --accounts 1

# List DMs only
python TeleHunt.py --list dms --accounts 1

# List with table format
python TeleHunt.py --list all --accounts 1 --table

πŸ“Έ Capture Features

Command Description Example
--capture Capture user messages python TeleHunt.py --capture --accounts 1 --target "@username"
--target Target username python TeleHunt.py --capture --accounts 1 --target "@username" --limit 50
--forward Forward captured messages python TeleHunt.py --capture --accounts 1 --target "@username" --forward "@me"

Working Examples:

# Capture messages from user
python TeleHunt.py --capture --accounts 1 --target "@username" --limit 50

# Capture and forward to yourself
python TeleHunt.py --capture --accounts 1 --target "@username" --forward "@me" --limit 10

# Capture specific file type
python TeleHunt.py --capture --accounts 1 --target "@username" --type photo --limit 20

# Capture with table display
python TeleHunt.py --capture --accounts 1 --target "@username" --table

πŸ“ Output Files

File Description
accounts.json Stored accounts
links_database.json Found links by domain
downloads_history.json Download history
download_queue.json Download queue
proxy_config.json Proxy settings
downloads/ Downloaded files
sessions/ Telegram session files

πŸ› οΈ Advanced Usage Examples

Complete Workflow Example

# 1. Add account
python TeleHunt.py --add "abc123:12345:+989123456789"

# 2. Set proxy (optional)
python TeleHunt.py --proxy socks5 127.0.0.1 1080

# 3. Find links from channel
python TeleHunt.py --links --accounts 1 --domains "github.com" --limit 500

# 4. Download files from links
python TeleHunt.py --download --accounts 1 --sources "links.txt"

# 5. Forward messages
python TeleHunt.py --forward --accounts 1 --from "@channel" --to "@me" --limit 10

# 6. Check stats
python TeleHunt.py --download-stats

Using with Private Channel

# Download from private channel using link
python TeleHunt.py --download --accounts 1 --sources "https://t.me/c/2531141208/279"

# Download multiple messages from private channel
python TeleHunt.py --download --accounts 1 --sources "https://t.me/c/2531141208/279,https://t.me/c/2531141208/280"

πŸ”§ Requirements

telethon>=1.34.0
colorama>=0.4.6
tabulate>=0.9.0
aiohttp>=3.9.0
aiofiles>=23.2.0
aiohttp-socks>=0.8.0
PySocks>=1.7.1
tqdm>=4.66.0
psutil>=5.9.0

πŸ“± Termux Support

TeleHunt works perfectly on Android via Termux:

pkg update && pkg upgrade
pkg install python
pip install telethon colorama tabulate aiohttp aiofiles aiohttp-socks PySocks tqdm
python TeleHunt.py --help

Made with ❀️ by batmanpriv