Last active
February 24, 2017 11:12
-
-
Save ssm/043e10f92b9db05bdb6dee9bf6de87db to your computer and use it in GitHub Desktop.
Check the content of your "pass" password manager against the published list of sites using cloudflare
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Stig Sandbeck Mathisen <ssm@fnord.no> | |
# Checks the content of "pass" against the list of sites using cloudflare. | |
# Expect false positives, and possibly false negatives. | |
# TODO: remove the left part of each hostname from pass, to check domains. | |
set -euo pipefail | |
tempdir=$(mktemp -d) | |
trap 'echo >&2 "removing ${tempdir}" ; rm -rf "$tempdir"' EXIT | |
git clone https://github.com/pirate/sites-using-cloudflare.git "$tempdir" | |
grep -F -x -f \ | |
<(pass git ls-files | sed -e s,/,\ ,g -e s/.gpg// | xargs -n 1 | sort -u) \ | |
"${tempdir}/sorted_unique_cf.txt" \ | |
| sort -u |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment