This project uses Flask to expose an API that runs the sublist3r.py
script to gather subdomains for a given domain. The application can be run locally or deployed on a server (e.g., Render).
- Python 3: Make sure you have Python 3 installed on your machine.
- Virtual Environment: It’s recommended to use a virtual environment to manage dependencies.
To get started with the project, you first need to clone the repository to your local machine.
- Open Terminal or Command Prompt.
- Run the following command to clone the repository:
git clone https://github.com/jr-boney/dorku-backend.git
- Navigate to the project directory:
cd dorku-backend
- Open Command Prompt or PowerShell.
- Navigate to the project directory where the
requirements.txt
file is located. - Run the following command to create a virtual environment:
python -m venv venv
- Activate the virtual environment:
.\venv\Scripts\activate
- Install the required dependencies:
pip install -r requirements.txt
- Open Terminal.
- Navigate to the project directory where the
requirements.txt
file is located. - Run the following command to create a virtual environment:
python3 -m venv venv
- Activate the virtual environment:
- For Linux:
source venv/bin/activate
- For macOS:
source venv/bin/activate
- For Linux:
- Install the required dependencies:
pip install -r requirements.txt
Sometimes the relative path to the sublist3r.py
file may not work as expected due to different working directories. If you're running the project locally, you may need to modify the path to sublist3r.py
.
- Open
sublist3r_api.py
. - Find line 20 (where
sublist3r.py
is executed). - Change the path to
sublist3r.py
based on its location on your local machine.
Change this line:
result = subprocess.run(
['python', r'sublist3r.py', '-d', domain], # Original code
stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
To this (adjust the path based on your local setup):
result = subprocess.run(
['python', r'path_to_your_local_sublist3r_folder\sublist3r.py', '-d', domain], # Adjust this path
stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
For example (if sublist3r.py
is located in the dorku-backend
folder):
result = subprocess.run(
['python', r'C:\path\to\dorku-backend\sublist3r.py', '-d', domain], # Windows example
stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
For Linux/macOS, it might look like this:
result = subprocess.run(
['python3', r'/path/to/dorku-backend/sublist3r.py', '-d', domain], # Linux/macOS example
stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
Once the path is updated, you can run the Flask application locally.
- Make sure your virtual environment is activated.
- Run the Flask application:
This will start the Flask app on
python app.py
http://127.0.0.1:5000
.
You can test the /subdomains
API endpoint using a tool like Postman or simply through a browser by visiting the following URL:
http://127.0.0.1:5000/subdomains?domain=example.com
This will return a list of subdomains for the given domain.
If you're deploying this application on Render (or any other cloud platform):
- Push your code to GitHub.
- Set up your project on Render:
- Choose Python as the environment.
- Point Render to the
main
branch of your GitHub repository.
- Render will automatically install dependencies from
requirements.txt
and deploy your Flask app.
Once deployed, you can test the /subdomains
endpoint on Render:
http://your-app-name.onrender.com/subdomains?domain=example.com
Sublist3r is licensed under the GNU GPL license. take a look at the LICENSE for more information.
- TheRook - The bruteforce module was based on his script subbrute.
- Bitquark - The Subbrute's wordlist was based on his research dnspop.
- Special Thanks to Ibrahim Mosaad for his great contributions that helped in improving the tool.
Current version is 1.0