Last active
April 30, 2021 16:50
-
-
Save nikallass/946d4fe45d883bb7c5de06b16a7f4ece to your computer and use it in GitHub Desktop.
Search PTRarchive for subdomains and IPs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$1" == "-h" ] || [ "$1" == "--help" ] || [[ $# -eq 0 ]] | |
then | |
me=`basename "$0"` | |
echo "Find subdomains in PTR-archive http://ptrarchive.com/tools/search.htm?date=ALL&label=example.com" | |
echo -e "Usage:\n\t./${me} [domain]" | |
echo -e "Example:\n\t./${me} example.com" | |
echo -e "\t./${me} -v example.com # Verbose output, includes IPs." | |
exit 1 | |
fi | |
if [ "$1" == "-v" ] || [ "$1" == "--verbose" ] | |
then | |
curl http://ptrarchive.com/tools/search3.htm\?label\=$2\&date\=ALL 2>/dev/null | grep -P '^\d+\.\d+\.\d+\.\d+' | |
exit 1 | |
fi | |
curl http://ptrarchive.com/tools/search3.htm\?label\=$1\&date\=ALL 2>/dev/null | grep -oP '(?<=\] ).*?(?= \[)' | sort | uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OSINT Script queries ptrarchive.com finding subdomains, IP adresses.
Source: http://ptrarchive.com/tools/search.htm?date=ALL&label=example.com