private-tor-network/util/get_consensus.py

9 lines
304 B
Python
Raw Normal View History

from stem.control import Controller
with Controller.from_port(port = 9051) as controller:
controller.authenticate("password")
2016-07-09 23:33:24 +00:00
print("List of relays found on the network:")
for desc in controller.get_network_statuses():
2016-07-09 23:33:24 +00:00
print("%s (%s) at %s" % (desc.nickname, desc.fingerprint, desc.address))