summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2013-02-12 21:20:20 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2013-02-12 21:20:20 +0000
commit40a069275e66f1208d37efd373d74941e85058c5 (patch)
tree46e2bb5f1ad6a59940726b7f390ade8fed8cb08d
parent61dee3ccc261a337f80dd30fc21c1aa52a1bb6b2 (diff)
feature creep is horrible: support base64 fingerprints
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@584 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rwxr-xr-xtor-exit-ssl-check5
1 files changed, 5 insertions, 0 deletions
diff --git a/tor-exit-ssl-check b/tor-exit-ssl-check
index 0e881f5..9112b52 100755
--- a/tor-exit-ssl-check
+++ b/tor-exit-ssl-check
@@ -165,6 +165,11 @@ while : ; do
fi
server="${server// /}"
+ # de-base64 if needed
+ if [ "$(echo "$server" | wc -c)" = 28 ] ; then
+ server=$(echo "$server" | perl -MMIME::Base64 -e "print unpack(\"H*\", decode_base64(<>)),\"\n\"")
+ fi
+
[ "$verbose" = 0 ] || echo "Setting ExitNodes $server"
echo "RESETCONF ExitNodes" >&${COPROC[1]}
expect_ok