A modern full-stack malware analysis web application built with Flask, React + Vite, and PostgreSQL. Users can upload a file and instantly receive a clean/suspicious/malicious classification. All past scans are saved in the PostgreSQL database and displayed in the Recent Scans section.
| Component | URL |
|---|---|
| Frontend (Netlify) | https://malwaretest.netlify.app |
| Backend API (Render) | https://malware-test.onrender.com |
- Built with React + Vite
- Neon cyber-themed UI
- File upload (button + drag-and-drop)
- Real-time scan progress indicator
- Dynamic Recent Scans table
- Fully responsive on desktop + mobile
- Flask REST API
- PostgreSQL with SQLAlchemy ORM
- File hashing & text extraction
- Simple signature-based malware detection
- CORS support
- Fully Dockerized and deployable
Stores each scan as a record containing:
filenameresulttimestamp
- User uploads a file in the UI
- The frontend sends it to the backend:
POST /scan - Backend:
- Validates file
- Extracts text
- Computes hash
- Checks signatures
- Result is saved to PostgreSQL
- Frontend refreshes the Recent Scans section
- React
- Vite
- Tailwind CSS
- Netlify Hosting
- Python / Flask
- Flask-SQLAlchemy
- psycopg2
- Docker
- Render Hosting
- PostgreSQL (Render Free Tier)
git clone https://github.com/Gochatsurtsumia/Malware-Test.git
cd Malware-Testcd backend
python -m venv venvActivate virtual environment:
- Windows:
venv\Scripts\activate - Mac / Linux:
source venv/bin/activate
Install dependencies:
pip install -r requirements.txtCreate backend/.env:
DATABASE_URL=postgresql://your_db_url
SECRET_KEY=your_secretRun backend:
python app.pycd frontend
npm install
npm run devRender deletes free-tier databases after 3 months. When it expires:
- Recent Scans table becomes empty
- You must create a new DB
- Update
backend/.envwith the newDATABASE_URL
Render free hosting sleeps when idle.
Symptoms:
- Connection failed
- CORS error
- Timeout
- Empty responses
Solution:
- Wait 10β30 seconds after first request
- Everything works normally after warm-up
- This is expected behavior β NOT a bug
- Docker auto-detects port
- Deploy directly from GitHub
- Required environment variable:
DATABASE_URL=
- Build command:
npm run build - Publish directory:
dist - Environment variable:
VITE_API_URL=https://malware-test.onrender.com
Malware-Test/
β
βββ backend/
β βββ app.py
β βββ models.py
β βββ Dockerfile
β βββ requirements.txt
β βββ ...
β
βββ frontend/
β βββ src/
β βββ public/
β βββ vite.config.js
β βββ ...
β
βββ README.md
- ML-powered malware classifier
- Dynamic sandbox behavior analysis
- Batch file scanning
- User accounts + private scan history
- JWT authentication
- WebSocket-based live scan updates
MIT License
Made with π by Gochatsurtsumia