domain_in_scope
is a Python script to check if a domain is in scope from a list of IP addresses.
It supports simple IP address (ex. 8.8.8.8
), CIDR-style addressing (ex. 8.8.8.0/24
) and octet range addressing (ex. 8.8.8.0-255
).
- You have a list of IP addresses that belong to you, and you want to check if a list of domains are hosted on these IP addresses.
- Python3
- Only use Python’s standard libraries, there is no need to install specific libraries
$ git clone https://github.com/pascal-sun/domain_in_scope.git
$ cd domain_in_scope
$ python domain_in_scope.py --help
usage: domain_in_scope [-h] [--domains [DOMAINS]] --ips [IPS] [--silent] [-t [THREADS]]
Return domains in IP addresses scope
options:
-h, --help show this help message and exit
--domains [DOMAINS] path to domains list
--ips [IPS] path to IP addresses list
--silent be silent and return only domains in scope
-t [THREADS], --threads [THREADS]
number of threads (default 25)
$ python domain_in_scope.py --domains <DOMAIN FILE PATH> --ips <IP FILE PATH>
With:
<DOMAIN FILE PATH>
path to file containing a list of domain to check (one domain per line)<IP FILE PATH>
path to file containing a list of IP address (one per line, can be an IP address or a CIDR)
The list of domain can be also piped via stdin:
$ cat <DOMAIN FILE PATH> | python domain_in_scope.py --ips <IP FILE PATH>
$ python domain_in_scope.py --domains domains.txt --ips ips.txt --silent
$ subfinder -d google.com -silent | python domain_in_scope.py --ips google_ips.txt --silent
$ amass enum -d google.com -nocolor 2>/dev/null | python domain_in_scope.py --ips google_ips.txt --silent
$ sublist3r -d google.io | python domain_in_scope.py --ips google_ips.txt --silent