The Bug Recon API is a web application built with FastAPI that provides automated reconnaissance capabilities for specified domains. The API performs subdomain enumeration, port scanning, vulnerability scanning, and directory brute-forcing. Additionally, it captures screenshots of the identified subdomains.
POST /bugrecon/
This endpoint initiates the reconnaissance process for the specified domain.
{
"domain": "example.com",
"recon_depth": "shallow" // Options: "shallow", "medium", "deep"
}
- domain: The target domain for reconnaissance.
- recon_depth: The depth of the reconnaissance, which can be one of the following:
shallow
: Only subdomain enumeration.medium
: Subdomain enumeration and port scanning.deep
: Full reconnaissance including subdomain enumeration, port scanning, vulnerability scanning, and directory brute-forcing.
-
200 OK: Reconnaissance completed successfully.
- Response Body:
{ "message": "Recon complete for example.com.", "report_file": "example.com_report.txt" }
- Response Body:
-
400 Bad Request: If the
recon_depth
is invalid or no subdomains are found.- Response Body:
{ "detail": "[!] Invalid recon depth. Choose either 'shallow', 'medium', or 'deep'." }
- Response Body:
GET /download-report/{filename}
This endpoint allows users to download the generated reconnaissance report.
- filename: The name of the report file to download (e.g.,
example.com_report.txt
).
- 200 OK: Returns the requested report file.
- 404 Not Found: If the report file does not exist.
- Response Body:
{ "detail": "Report not found" }
- Response Body:
GET /download-screenshots/
This endpoint allows users to download a zip file containing all the screenshots taken during the reconnaissance process.
- 200 OK: Returns a zip file of the screenshots.
- 404 Not Found: If no screenshots have been generated.
- Response Body:
{ "detail": "Screenshots not found" }
- Response Body:
-
Start the FastAPI server: Run the application using Uvicorn:
uvicorn app:app --reload
-
Make a POST request to
/bugrecon/
: Use a tool likecurl
or Postman to send a request:curl -X POST "http://localhost:8000/bugrecon/" -H "Content-Type: application/json" -d '{"domain": "example.com", "recon_depth": "deep"}'
-
Download the report: Once the reconnaissance is complete, use the report filename provided in the response to download the report:
curl -O "http://localhost:8000/download-report/example.com_report.txt"
-
Download screenshots: To download screenshots, simply make a GET request to
/download-screenshots/
:curl -O "http://localhost:8000/download-screenshots/"
- Python 3.x
- FastAPI
- Requests
- Nmap
- FFUF
- Eyewitness
Make sure to have the necessary tools installed on your server or environment where this API will run.