Skip to content

Instantly share code, notes, and snippets.

@chazlever
Created May 10, 2019 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chazlever/fb149e0575a28671aeadbd5060e7720d to your computer and use it in GitHub Desktop.
Save chazlever/fb149e0575a28671aeadbd5060e7720d to your computer and use it in GitHub Desktop.
Download certificates from CT logs in JSON format
#!/bin/bash
main() {
readonly local outdir=$1
local urls=(
"ct.googleapis.com/logs/argon2018" \
"ct.googleapis.com/logs/argon2019" \
"ct.googleapis.com/logs/argon2020" \
"ct.googleapis.com/logs/argon2021" \
"ct.googleapis.com/logs/xenon2019" \
"ct.googleapis.com/logs/xenon2020" \
"ct.googleapis.com/logs/xenon2021" \
"ct.googleapis.com/logs/xenon2022" \
"ct.googleapis.com/aviator" \
"ct.googleapis.com/icarus" \
"ct.googleapis.com/pilot" \
"ct.googleapis.com/rocketeer" \
"ct.googleapis.com/skydiver" \
"ct.cloudflare.com/logs/nimbus2018" \
"ct.cloudflare.com/logs/nimbus2019" \
"ct.cloudflare.com/logs/nimbus2020" \
"ct.cloudflare.com/logs/nimbus2021"
)
for url in "${urls[@]}"; do
./scanlog \
-log_uri "https://$url" \
-json_dir "$outdir/$url" \
-parallel_fetch 100 \
echo $url
done
}
main "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment