In your research on discovering the origin Ip address of a web applications, using shodan, urlx, waybackurl, gather as many IP address possible save in a txt file and automate with the script.
This script is designed to resolve IP addresses to their respective titles by sending HTTP requests to specified ports. It utilizes Python's asyncio
and aiofiles
libraries for asynchronous processing and combines the use of curl
and httpx
tools to fetch and process HTTP responses efficiently. If you find this useful, do well to leave me a star.
- Concurrent Resolution: Process multiple IPs concurrently for faster execution.
- Customizable Ports: By default, the script checks ports 80, 443, and 8080, but this can be modified in the code.
- Asynchronous I/O: Efficiently handles file and subprocess operations.
- Error Handling: Captures and reports errors during the resolution process.
Ensure you have the following installed on your system:
- Python 3.7+
- curl: A command-line tool for transferring data.
- httpx: A lightweight tool for processing HTTP requests.
-
Clone this repository:
git clone https://github.com/haykeenss/OriginIP-Catch.git cd OriginIP-Catch
-
Install Python dependencies:
pip install aiofiles
-
Make sure
curl
andhttpx
are installed and available in your PATH.sudo apt install curl sudo apt install httpx # or install httpx using your package manager // sudo apt install httpx-toolkit
-
Prepare the IP List
-
Create a text file containing one IP address per line. For example:
192.168.1.1 10.0.0.2 172.16.0.3
-
-
Run the Script
-
Execute the script using Python:
python3 resolve_ips.py
-
-
Provide Input File
- When prompted, enter the path to your IP list file.
-
Check Results
- The resolved titles and IP-port combinations will be saved to a file named
resolved_ip.txt
.
- The resolved titles and IP-port combinations will be saved to a file named
Prompts the user for the path to an input file containing IP addresses and validates the file's existence.
Processes a single IP address by attempting to resolve titles for the specified ports (default: 80, 443, 8080) using curl
and httpx
. Returns a list of resolved titles.
Coordinates the resolution process by:
- Reading the input file
- Concurrently processing IP addresses
- Writing results to the output file
Results are saved in resolved_ip.txt
with the format:
<IP>:<Port> - <Title>
For an input file with the following IPs:
192.168.1.1
10.0.0.2
The resolved_ip.txt
might contain:
192.168.1.1:80 - Apache Server Default Page
192.168.1.1:443 - Secure Apache Server
10.0.0.2:8080 - Custom Application Title
- File Not Found: Ensure the file path is correct and accessible.
- curl/httpx Errors: Verify that
curl
andhttpx
are correctly installed and configured.(if httpx not working for you, you can use install httpx-toolkit, the script is configured for both.) - Empty Results: Confirm the IPs are reachable and the ports are open.
This project is licensed under the MIT License. Feel free to use and modify it as needed.
Contributions are welcome! Please fork the repository and submit a pull request.
For questions or support, contact the repository owner at [haytech46@gmail.com].