Onionr/src/netcontroller/torcontrol/torcontroller.py

10 lines
207 B
Python
Raw Normal View History

from stem.control import Controller
import config
def get_controller():
c = Controller.from_port(port=config.get('tor.controlPort'))
c.authenticate(config.get('tor.controlpassword'))
return c