API Documentation
Malware Detection System
The system provides RESTful APIs for third-party applications to easily integrate automated malware scanning and detection features.
Getting Started
Welcome to the Malware Detection API. This documentation covers all available endpoints to help you
integrate automated malware scanning into your applications. The API is RESTful, uses JSON responses, and is
accessible via HTTP on 18.141.55.23:5001 by default.
File Analysis Endpoint
This endpoint allows uploading one or more executable files (.exe) to perform
analysis.
- Endpoint: POST /upload
- Note: For safety and server stability, the total file size per request is limited to 200MB.
Send (Single File)
curl -X POST -F "files=@C:\path\to\file.exe" https://fptmalwaredetection.duckdns.org/upload
Send (Multiple Files)
curl -X POST -F "files=@file1.exe" -F "files=@file2.exe" https://fptmalwaredetection.duckdns.org/upload
{ "data": { "session_id": "abc123", "status": "processing", "total_files": 1 }, "message": "Upload successful, processing started", "status_code": 200 }
Result Endpoint
Use the session_id
from the Upload step to track scan progress and retrieve final results.
Endpoint: GET /status/{session_id}
curl https://fptmalwaredetection.duckdns.org/status/<session_id>
{ "message": "Session not found", "status_code": 404 }
{ "data": { "results": [ {"filename": "file.exe", "is_malware": true}, {"filename": "file2.exe", "is_malware": false} ], "summary": { "total_files": 2, "malware_detected": 1 }, "status": "completed" }, "message": "Success" }
Export CSV
Retrieve results and automatically convert JSON to a results.csv file using this
command:
curl https://fptmalwaredetection.duckdns.org/status/[session_id] | python -c "import sys,json,csv;d=json.load(sys.stdin)['data'];r=d['results'];w=csv.writer(sys.stdout);w.writerow(['filename','is_malware','malware_probability','status','error']);[w.writerow([x['filename'],x['is_malware'],x['malware_probability'],x['status'],x['error']]) for x in r];print('--- Summary ---');[print(k+':',v) for k,v in d['summary'].items()]" > results.csv
Rate Limits
Currently, no rate limits are enforced. Future updates may introduce limits for system stability and DDoS protection. The team is actively evaluating optimal thresholds to balance performance and security.
Integration Workflow
Step-by-Step Implementation
Send files to /upload (total size < 200MB) and get a session_id.
Call: GET /status/{session_id} to get result.
Completion: When status is 'completed', extract results or run the CSV Export command.
Important Notes
- • Rate Limit: Currently no Rate Limit applied. Team evaluating optimal thresholds for DDoS protection.
- • Coming Soon: Upload Folder (recursive scan), Export to CSV (server-side generation).
Secure API Access
Encryption and safety are prioritized. Specialized Rate Limit configuration is currently out-of-scope but deep defense is active.