This repository contains a Python script that retrieves all IP addresses in the netblocks of a given AS number and scans the web services running on those IP addresses. It utilizes the RIPE Stat API to fetch the announced prefixes for the specified AS number and then generates a list of IP addresses within those netblocks.
The script makes use of the requests
library to send HTTP requests to each IP address and port combination, checking if a web service is running. Additionally, it extracts the domain name associated with each IP address using reverse DNS lookup.
- Run the script using the following command:
python3 scanner.py NUMBER
, ReplaceNUMBER
with the desired AS number. - The script will retrieve all IP addresses in the netblocks of the specified AS number and save them to
ips.txt
. - It will then scan the web services running on those IP addresses and print the results to the console.
- Any open ports will be logged to
open_ports.txt
along with the associated domain names.
- Python 3.x
requests
library
This project is licensed under the MIT License.