Skip to content

Instantly share code, notes, and snippets.

@masterflitzer
Created August 4, 2024 19:51
Show Gist options
  • Save masterflitzer/cf287cd978105510891010f46e165a13 to your computer and use it in GitHub Desktop.
Save masterflitzer/cf287cd978105510891010f46e165a13 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
domain="${1}"
hsts_preload_url="https://github.com/chromium/chromium/raw/main/net/http/transport_security_state_static.json"
curl -Ls "${hsts_preload_url}" | grep -Piv "^$|^\s*//" | jq -e ".entries[] | select(.name == \"${1}\")"
exit_code="${?}"
printf "\n"
test "${exit_code}" -eq 0 && printf "true" || printf "false"
printf "\n"
exit "${exit_code}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment