Created
June 20, 2020 10:28
-
-
Save pikpikcu/ae4ca76172004233e6e5952225c07d6f to your computer and use it in GitHub Desktop.
Pasive OSINT subdomain
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