Skip to content

Instantly share code, notes, and snippets.

@nikallass
Last active April 30, 2021 16:50
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save nikallass/946d4fe45d883bb7c5de06b16a7f4ece to your computer and use it in GitHub Desktop.
Save nikallass/946d4fe45d883bb7c5de06b16a7f4ece to your computer and use it in GitHub Desktop.
Search PTRarchive for subdomains and IPs
#!/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
@nikallass
Copy link
Author

nikallass commented May 11, 2018

OSINT Script queries ptrarchive.com finding subdomains, IP adresses.

USAGE:
./ptrarc.sh example.com 
./ptrarc.sh -v example.com
./ptrarc.sh --verbose example.com

Source: http://ptrarchive.com/tools/search.htm?date=ALL&label=example.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment