#!/bin/sh
if [[ $# -eq 0 ]] ;
then
echo "Usage: ./subdo.sh site.com"
exit 1
else
echo "[+] Start crt.sh..."
curl 'https://crt.sh/?q=%.'$1'&output=json' | jq '.[] | {name_value}' | sed 's/\"//g' | sed 's/\*\.//g' | sort -u |grep "name_value"|cut -d ' ' -f4 > $1.txt
echo "[+] Start Web Archive.org..."
curl -s "http://web.archive.org/cdx/search/cdx?url=*."$1"/*&output=text&fl=original&collapse=urlkey" |sort| sed -e 's_https*://__' -e "s/\/.*//" -e 's/:.*//' -e 's/^www\.//' | uniq >>$1.txt
echo "[+] Start Dns bufferover..."
curl -s "https://dns.bufferover.run/dns?q=."$1 | jq -r .FDNS_A[]|cut -d',' -f2|sort -u >>$1.txt
echo "[+] Start Certspotter..."
curl -s "https://certspotter.com/api/v0/certs?domain="$1 | jq '.[].dns_names[]' | sed 's/\"//g' | sed 's/\*\.//g' | sort -u | grep $1 >>$1.txt
echo "[+] Start amass..."
curl -s -X POST --data "url=$1&Submit1=Submit" https://suip.biz/?act=amass | grep $1 | cut -d ">" -f 2 | awk 'NF' | uniq >>$1.txt
echo "[+] Start Subfinder..."
curl -s -X POST --data "url=$1&Submit1=Submit" https://suip.biz/?act=subfinder | grep $1 | cut -d ">" -f 2 | awk 'NF' | uniq >>$1.txt
sort -u $1.txt | egrep -v "^http$|https$" |tee -a $1.txt
echo "[+] Subdomain $(wc -l $1.txt | awk '{ print $1 }' )" "=> ${1}"
echo "[+] Save File: "$(pwd)/"$1.txt"
# cat $1.txt
fi
Created
January 21, 2020 05:59
-
-
Save pikpikcu/91c308c6359cacf374c94e2541e17e93 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment