Guest User

Untitled

a guest
Apr 21st, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. # Name: tldchecker.sh
  2. # Version: 1.1
  3. # Author: kohlbrr
  4. # Version history:
  5. # 1.0 - 4/13/18 - Initial commit
  6. # 1.1 - 4/13/18 - Added epoch dir layer
  7.  
  8. #!/bin/bash
  9.  
  10. set -eu
  11.  
  12. rn=$1
  13. epoch="$(date +%s)"
  14.  
  15. # Repository for logging the whois output
  16. mkdir -p output/$rn
  17. mkdir -p output/$rn/$epoch
  18.  
  19. # Generate a .txt log of each whois response
  20. grep -v '^/' < list/public_suffix_list.dat |
  21. grep -v '^$' |
  22. { while read tld;
  23. do whois $rn.$tld |
  24. tee output/$rn/$epoch/$tld.txt;
  25. done; }
Add Comment
Please, Sign In to add comment