The little things give you away... A collection of various small helper stuff
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

16 lignes
649 B

  1. #!/bin/bash
  2. set -euo pipefail
  3. if [[ $# -eq 0 || "$1" == '-h' || "$1" == '--help' ]]
  4. then
  5. echo "Usage: ia-cdx-search-subdomains [OPTIONS] DOMAIN" >&2
  6. echo "Extracts all known subdomains from IA's CDX API, printing unique subdomains to stdout" >&2
  7. echo "Any options are passed through to ia-cdx-search; use this to customise parallelism or resume after errors" >&2
  8. exit 1
  9. fi
  10. domain="${@: -1}"
  11. set -- "${@:1:$(($#-1))}"
  12. scriptpath="$(cd "$(dirname "$0")"; pwd -P)"
  13. "${scriptpath}/ia-cdx-search" "$@" "url=${domain}&collapse=urlkey&fl=original&matchType=domain" | grep -o '^[^/]*//[^/"]*' | sed 's,^.*/,,; s,:[0-9]\+$,,' | "${scriptpath}/uniqify"