Skip to content

Instantly share code, notes, and snippets.

@sneak
Last active February 1, 2020 16:56
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 sneak/5604101bf1927dba216d6220cecf0e05 to your computer and use it in GitHub Desktop.
Save sneak/5604101bf1927dba216d6220cecf0e05 to your computer and use it in GitHub Desktop.
how to get the tls fingerprint for an onion service in a format compatible with weechat
#!/bin/bash
ONION="gg5kq3jrfshwr7qygs3tl5vwnwf4ocfh6jeahumejdct6frld3kvaqqd.onion"
PORT=6697
torify openssl s_client -connect $ONION:$PORT -showcerts 2>/dev/null |
openssl x509 -in /dev/stdin -noout -fingerprint |
awk -F'=' '{print $2}' |
tr -d ':'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment