Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # regex kullanmadan splunk.com subdomainlerinin
- # IP adreslerini bulmak
- SITE='splunk.com'
- DOSYA='index.txt'
- SUBDOM='subdomainler.txt'
- IPLER='ipler.txt'
- wget $SITE -O $DOSYA -q
- if [ ! -f $DOSYA ]
- then
- echo "Site indirilemedi!"
- else
- # subdomainleri cekelim
- echo "$SITE index indirildi, subdomainler taraniyor.."
- cat $DOSYA |
- grep "splunk.com" |
- cut -d "\"" -f2 |
- cut -d ";" -f4 |
- grep ".splunk.com" |
- grep -v "/" |
- cut -d "." -f1 |
- sort |
- uniq >> $SUBDOM
- # bulunan subdomainlerin hostuna bakalim ve dosyaya kaydedelim
- echo "$SITE icin bulunan subdomainlerin IP adresleri tespit ediliyor.."
- for sdom in $(cat $SUBDOM); do
- host -4 "$sdom.$SITE" >> $IPLER;
- done
- # bulunan IP adreslerini temizleyelim ve ekrana basalim
- echo "$SITE subdomain IP adresleri:"
- cat $IPLER |
- cut -d ' ' -f4 |
- grep -v 'alias' |
- sort |
- uniq
- rm $DOSYA
- rm $SUBDOM
- rm $IPLER
- fi
Add Comment
Please, Sign In to add comment