File: get_hidden_service_descriptor.py

package info (click to toggle)
python-stem 1.8.1-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,152 kB
  • sloc: python: 33,747; java: 312; makefile: 124; sh: 14
file content (8 lines) | stat: -rw-r--r-- 271 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
from stem.control import Controller

with Controller.from_port(port = 9051) as controller:
  controller.authenticate()

  # descriptor of duck-duck-go's hidden service (http://3g2upl4pq6kufc4m.onion)

  print(controller.get_hidden_service_descriptor('3g2upl4pq6kufc4m'))