yakar

CSR / Hazırlık Ödevi 1

Mar 23rd, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. # regex ile splunk.com subdomainlerinin
  3. # IP adreslerini bulmak
  4.  
  5. SITE='splunk.com'
  6. DOSYA='splunk.txt'
  7.  
  8. wget $SITE -O $DOSYA -q
  9.  
  10. if [ ! -f $DOSYA ]
  11. then
  12.         echo "Site indirilemedi!"
  13. else
  14.         echo ">> IP adresleri:"
  15.         cat $DOSYA |
  16.         grep -iEo "([a-z0-9-]*\.splunk\.com)" |
  17.         sort |
  18.         uniq |
  19.         xargs -l host -4 |
  20.         grep -iEo "([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})" |
  21.         sort -r |
  22.         uniq
  23. fi
Add Comment
Please, Sign In to add comment