Created
January 6, 2021 20:35
-
-
Save conorsch/d7aea8c0b8aedb1a22e8bb2f22009a3c to your computer and use it in GitHub Desktop.
Query SecureDrop v2/v3 stats
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 | |
# Helper script to query the SecureDrop Directory API, | |
# and display how many instances are serving Onion v3 URLs. | |
set -e | |
set -u | |
set -o pipefail | |
onion_info="$(curl -s https://securedrop.org/api/v1/directory/ | python3 -m json.tool | grep -i onion_address)" | |
printf '%d/%d SecureDrop directory instances use v3 URLs\n' \ | |
"$(echo "$onion_info" | grep -P '\w{25,}.onion' | wc -l)" \ | |
"$(echo "$onion_info" | wc -l)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment