daily pastebin goal
67%
SHARE
TWEET

Untitled

a guest Apr 21st, 2018 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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; }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top