Skip to content

Instantly share code, notes, and snippets.

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 gam-phon/730f96443432ac4da4770d654107485a to your computer and use it in GitHub Desktop.
Save gam-phon/730f96443432ac4da4770d654107485a to your computer and use it in GitHub Desktop.
Get the latest version of https://chromium.googlesource.com/chromium/src/+/master/net/http/transport_security_state_static.json in an automated way and convert it to proper JSON
#!/usr/bin/env bash
# https://code.google.com/p/chromium/issues/detail?id=226801
url='https://chromium.googlesource.com/chromium/src/net/+/master/http/transport_security_state_static.json?format=TEXT';
curl -#s "${url}" | \
base64 --decode | \
sed '/^ *\/\// d' | \
sed '/^\s*$/d' > hsts.json;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment