This repository provides various security testing endpoints including full scans, XSS tests, SQLi tests, CSRF tests, file upload tests, privilege escalation tests, rate limit tests, and directory brute force tests.
- Clone the repository:
git clone https://github.com/yourusername/security-testing-api.git cd security-testing-api
Install the required dependencies:
sh Copy code pip install -r requirements.txt Run the FastAPI application:
sh Copy code uvicorn main:app --reload Endpoints Full Scan POST /full_scan
Performs a full scan including various tests.
Example:
sh Copy code curl -X POST "http://localhost:8000/full_scan" \ -F target="http://example.com" \ -F param="id" \ -F credentials="username:password" \ -F wordlist=@wordlist.txt \ -F upload_file=@testfile.txt \ -F password_list_file=@passwords.txt \ -F useragents_file=@useragents.txtPerforms a scan using Nmap on the provided target.
Example:
sh Copy code curl -X POST "http://localhost:8000/scan" \ -H "Content-Type: application/json" \ -d '{"target": "http://example.com"}'Performs an XSS test on the provided target.
Example:
sh Copy code curl -X POST "http://localhost:8000/xss_test" \ -H "Content-Type: application/json" \ -d '{"target": "http://example.com"}'Performs an SQLi test on the provided target with a parameter.
Example:
sh Copy code curl -X POST "http://localhost:8000/sqli_test" \ -H "Content-Type: application/json" \ -d '{"target": "http://example.com", "param": "id"}'Performs a CSRF test on the provided target.
Example:
sh Copy code curl -X POST "http://localhost:8000/csrf_test" \ -H "Content-Type: application/json" \ -d '{"target": "http://example.com"}'Performs a file upload test on the provided target.
Example:
sh Copy code curl -X POST "http://localhost:8000/file_upload_test" \ -F target="http://example.com" \ -F upload_file=@testfile.txtPerforms a privilege escalation test on the provided target.
Example:
sh Copy code curl -X POST "http://localhost:8000/privilege_escalation_test" \ -H "Content-Type: application/json" \ -d '{"target": "http://example.com", "credentials": "username:password"}'Performs a rate limit test on the provided target.
Example:
sh Copy code curl -X POST "http://localhost:8000/rate_limit_test" \ -F target="http://example.com" \ -F username="admin" \ -F password_list=@passwords.txtPerforms a directory brute force test on the provided target.