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 β¦