terabox-downloader
v1.1.1
Published
Telegram bot untuk download file dari Terabox — satu command langsung jalan
Maintainers
Readme
📦 Terabox Downloader Bot
Telegram Bot untuk download file dari Terabox — kirim link, terima file. Dynamic QRIS payment via KlikQRIS. Satu command langsung jalan.
🚀 Quick Start
npm install -g terabox-downloader
tbdPertama kali jalan, CLI interactive wizard akan nanya:
🤖 Bot Token (dari @BotFather): <paste>
👑 Admin Telegram ID: <paste>
💰 Harga VIP (default: 10000): <enter>
⏳ Durasi VIP (default: 7 hari): <enter>
🔑 KlikQRIS API Key: <paste>
🏪 KlikQRIS Merchant ID: <paste>
🧪 Sandbox mode? (y/N): <enter>✅ Bot langsung jalan. Ga perlu clone — CLI handle semuanya.
tbd # Start bot (setup wizard di first run)
tbd setup # Ulang konfigurasi .env
tbd update # Git pull + update Python dependencies
tbd start # Jalankan bot (skip wizard)
# Atau nama panjang:
terabox-downloader [setup|update|start]| Metode | Command |
|---|---|
| npx (tanpa install) | npx terabox-downloader |
| pip | pip install terabox-downloader-bot |
| Docker | docker run -e BOT_TOKEN=xxx mocasus/terabox-downloader |
| Manual | Clone repo → pip install -r requirements.txt → python bot.py |
Prasyarat: Node.js 18+, Python 3.10+, Git.
✨ Fitur
| Fitur | Detail |
|---|---|
| 🔗 Multi-mirror | terabox.com, teraboxapp.com, mirrobox.com, 1024tera.com, dll |
| 🔍 Multi-strategy | Savetube (primary) → Publicearn → Direct — auto-fallback |
| ⬇️ Smart upload | Auto-detect video/dokumen/audio, progress bar, file >50MB via direct link |
| 💳 KlikQRIS | Dynamic QR code — scan via GoPay/OVO/DANA/M-Banking, auto-callback webhook |
| 🎮 Inline buttons | Semua aksi bisa via tombol — ga perlu ketik command |
| 🛡️ Admin panel | Approve manual, tambah VIP, broadcast, stats |
| 🔒 HMAC signature | Verifikasi setiap webhook callback — anti fake payment |
| 🆓 Trial mode | Free download N kali sebelum wajib VIP |
📋 Perintah Bot
User
| Command | Fungsi |
|---|---|
| /start | Register + menu utama (inline keyboard) |
| /help | Bantuan — download, bayar, VIP, FAQ |
| /vip | Info harga & beli VIP |
| /bayar | Buat QR code pembayaran |
| /status | Cek status akun & VIP |
Admin
| Command | Fungsi |
|---|---|
| /pending | Lihat pembayaran menunggu |
| /approve <id> | Setujui pembayaran |
| /reject <id> <alasan> | Tolak pembayaran |
| /vipadd <uid> <hari> | Tambah VIP (0 = lifetime) |
| /viprem <uid> | Cabut VIP |
| /vips | List semua VIP |
| /stats | Statistik user, VIP, revenue |
| /broadcast <msg> | Kirim pesan ke semua user |
💳 KlikQRIS — Cara Setup
- Daftar di klikqris.com → verifikasi
- Ambil API Key dari dashboard → Pengaturan → API Key
- Isi .env:
KLIKQRIS_API_KEY=...+KLIKQRIS_MERCHANT_ID=... - Set webhook URL di dashboard KlikQRIS →
https://domain-kamu/webhook/klikqris - Test dengan sandbox:
KLIKQRIS_SANDBOX=true→ simulator → ganti kefalsesetelah OK
User /bayar → Bot create QR via KlikQRIS → User scan & bayar
→ KlikQRIS kirim webhook "PAID" → Bot verifikasi HMAC → VIP aktif⚙️ Environment Variables
| Variable | Wajib | Default |
|---|---|---|
| BOT_TOKEN | ✅ | — |
| ADMIN_IDS | ✅ | — |
| Variable | Default |
|---|---|
| VIP_ENABLED | true |
| VIP_PRICE | 10000 |
| VIP_DURATION_DAYS | 7 |
| VIP_TRIAL_ENABLED | true |
| VIP_TRIAL_DOWNLOADS | 3 |
| Variable | Default |
|---|---|
| KLIKQRIS_API_KEY | — |
| KLIKQRIS_MERCHANT_ID | — |
| KLIKQRIS_SANDBOX | false |
| KLIKQRIS_BASE_URL | https://klikqris.com |
| Variable | Default |
|---|---|
| WEBHOOK_HOST | http://localhost:8000 |
| WEBHOOK_PORT | 8000 |
| Variable | Default |
|---|---|
| MAX_FILE_SIZE_MB | 500 |
| DOWNLOAD_DIR | ./downloads |
🏗️ Arsitektur
terabox-downloader/
├── bot.py 🚀 Entry point
├── config.py ⚙️ Config loader
├── cli.js 💻 npm CLI installer
│
├── database/
│ ├── models.py 🗃️ SQLite (users, payments, VIP)
│ └── migrations.py 🔄 Auto-migrate
│
├── terabox/
│ ├── resolver.py 🔍 Multi-strategy engine
│ ├── downloader.py ⬇️ Async download + upload
│ ├── utils.py 🛠️ URL parser, formatter
│ └── strategies/
│ ├── savetube.py 🥇 Primary (no cookie)
│ ├── publicearn.py 🥈 Fallback (stub)
│ └── direct.py 🥉 Direct extraction (stub)
│
├── payments/
│ ├── klikqris.py 💳 KlikQRIS API client
│ ├── webhook_server.py 🌐 Webhook receiver
│ └── handler.py 🎯 Payment flow handlers
│
└── admin/
├── handlers.py 🛡️ Admin commands
└── stats.py 📊 Statistics| Layer | Teknologi | |---|---| | Bahasa | Python 3.10+ | | Bot | python-telegram-bot v20 | | DB | SQLite (WAL mode) | | HTTP | aiohttp | | CLI | Node.js (npm wrapper) | | Payment | KlikQRIS API |
📄 License
MIT — mocasus
