Created
September 18, 2019 20:07
-
-
Save fb11/e6304dfbb3bd40440b5d3353b276ca12 to your computer and use it in GitHub Desktop.
sub.sh
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 | |
| #@cihanmehmet tweets, @cihanmehmets | |
| if [[ $# -eq 0 ]] ; | |
| then | |
| echo "Usage: ./sub.sh findname2.com" | |
| exit 1 | |
| else | |
| 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 | |
| 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 | |
| cat $1.txt|sort -u | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment