Free Telegram bot that detects Nigerian phishing/scam messages.
# Naija CyberGuard Bot 🇳🇬
A free Telegram bot that analyses messages for scams in Nigeria.
It detects **scam keywords**, **suspicious domains**, and uses a **rule-based Mini-AI** to assign a **risk score** (Low / Medium / High).
---
## ⚡ Features
- Keyword-based scam detection
- Suspicious domain detection
- Rule-based Mini-AI risk scoring
- Risk levels and percentage score
- Works on **Render Free Tier** (no heavy ML required)
- 24/7 uptime once deployed
---
## 📥 Deployment
### 1️⃣ Clone the repository
```bash
git clone
cd naija-cyberguard
2️⃣ Install dependencies
bash
Copy code
pip install -r requirements.txt
3️⃣ Set up environment variables
Create a .env file or use Render Environment Variables:
ini
Copy code
BOT_TOKEN=
PORT=10000
4️⃣ Deploy on Render
Create a new Web Service → Python environment.
Upload this repository or connect GitHub.
Add the environment variables above.
Set Build Command:
nginx
Copy code
pip install -r requirements.txt
Set Start Command:
nginx
Copy code
python bot.py
Deploy.
5️⃣ Set Telegram Webhook
After deployment, run:
bash
Copy code
api.telegram.org /setWebhook?url= /webhook
💬 Usage
Start the bot:
bash
Copy code
/start
Send any message, text, or link. Examples:
cpp
Copy code
You have won ₦50,000! Click
bank-verify-secure.com to claim your reward immediately.
Bot Response:
yaml
Copy code
🔍 Scam Analysis Result:
🧠 Risk Level: 🟥 High
📊 Score: 87.0%
🪤 Keywords Detected: reward, claim, bank, click
🌐 Domains Found: bank-verify-secure.com
🚨 Suspicious Domains: bank-verify-secure.com
🤖 Model: Rule-Based Mini-AI
Other examples:
Normal message → Low risk
Urgent scam text → High risk
🔧 How it Works
Keyword Detection: Checks for common scam-related words like BVN, OTP, verify, reward.
Domain Analysis: Extracts URLs from the message and flags suspicious domains.
Rule-Based Mini-AI: Calculates a risk score using weighted rules:
Keywords → small weight
Suspicious domains → higher weight
Urgency words → e …