Skip to content

Instantly share code, notes, and snippets.

@nikallass
Last active Apr 30, 2021
Embed
What would you like to do?
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