Created
February 28, 2017 02:12
-
-
Save nusenu/8339cfd5351b64c47676241a40ee2942 to your computer and use it in GitHub Desktop.
accepts an onion address (without .onion suffix) and prints the introduction points (relay fingerprints)
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
#!/usr/bin/env python | |
from stem.control import Controller | |
import base64 | |
import binascii | |
import sys | |
onion = sys.argv[1] | |
with Controller.from_socket_file(path='/home/username/.tor/mytorsocket') as controller: | |
controller.authenticate() | |
desc = controller.get_hidden_service_descriptor(onion) | |
for introduction_point in desc.introduction_points(): | |
fingerprint = binascii.hexlify(base64.b32decode(introduction_point.identifier.upper())).upper() | |
print(onion+":"+fingerprint) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment