Smephishdefender
A web application that helps detect phishing URLs using machine learning. Submit a URL to get a risk assessment (Suspicious or Legitimate) along with supporting analysis such as WHOIS data, HTTPS status, and reputation checks.
Install / Use
/learn @pchukwuemeka424/SmephishdefenderREADME
SmePhishDefender
A web application that helps detect phishing URLs using machine learning. Submit a URL to get a risk assessment (Suspicious or Legitimate) along with supporting analysis such as WHOIS data, HTTPS status, and reputation checks.
Features
- URL phishing detection — Classifies URLs as Suspicious or Legitimate using trained Random Forest models
- Detailed analysis — URL length, special characters, digit/letter counts, shortening services, HTTPS, IP in domain, Google indexing, domain age (WHOIS), free hosting indicators, GeoIP data, DNS records, and more
- User accounts — Sign up, login, and role-based access (admin vs regular user)
- Admin dashboard — Manage sub-users, view reports, and see prediction statistics
- Prediction history — Save and view past URL checks and results
Tech Stack
- Backend: Flask, Flask-SQLAlchemy, Flask-Login, Flask-Bcrypt
- ML: scikit-learn (Random Forest), NumPy
- Data: SQLite (default), WHOIS, DNS lookups, tldextract, GeoIP2
- Frontend: Jinja2 templates, Bootstrap-style UI
- Additional libraries: beautifulsoup4, requests, nltk, dnspython, geoip2, python-whois
Prerequisites
- Python 3.8+
- pip
Installation
-
Clone the repository (or navigate to the project folder):
cd smephishdefender -
Create a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install dependencies:
pip install -r requirements.txt -
Configure the app (optional but recommended):
- Set a strong
secret_keyinapp.pyfor production (replace'your_secret_key'). - If you use external APIs (e.g. AbuseIPDB, IPQualityScore), set your keys via environment variables or config and avoid committing them.
- Set a strong
Running the App
-
From the project root, run:
python app.py -
Open a browser and go to:
http://127.0.0.1:5000 -
Sign up or log in, then use the dashboard to enter a URL and run a phishing check.
Project Structure
smephishdefender/
├── app.py # Flask app, routes, ML prediction logic
├── requirements.txt # Python dependencies
├── machine_train_model.pkl # Trained phishing-detection model (primary)
├── fmodel.pkl # Additional trained phishing-detection model
├── 2020 machie (2).ipynb # Jupyter notebook with model training code
├── instance/
│ └── app.db # SQLite database (created on first run)
├── static/ # CSS, JS, images
├── templates/ # HTML templates (login, dashboards, reports, etc.)
└── README.md
Model & Training
The phishing classifiers are trained on URL features (length, special characters, shortening services, HTTPS, IP in URL, Google index, domain length, free hosting, etc.). Serialized models are stored in machine_train_model.pkl (primary) and fmodel.pkl (additional). Training code is available in the included Jupyter notebook (2020 machie (2).ipynb) for reference or retraining.
License
Use and modify as needed for your project. Consider adding a specific license file if you plan to publish.
Related Skills
openhue
341.6kControl Philips Hue lights and scenes via the OpenHue CLI.
sag
341.6kElevenLabs text-to-speech with mac-style say UX.
weather
341.6kGet current weather and forecasts via wttr.in or Open-Meteo
tweakcc
1.5kCustomize Claude Code's system prompts, create custom toolsets, input pattern highlighters, themes/thinking verbs/spinners, customize input box & user message styling, support AGENTS.md, unlock private/unreleased features, and much more. Supports both native/npm installs on all platforms.
