Onionr/static-data/default-plugins/tor/getsocks.py
2022-02-21 15:15:26 -06:00

10 lines
247 B
Python

from stem.control import Controller
from torfilepaths import control_socket
def get_socks():
with Controller.from_socket_file(control_socket) as controller:
controller.authenticate()
return controller.get_listeners('SOCKS')