Onionr/src/netcontroller/__init__.py

12 lines
286 B
Python
Raw Normal View History

2022-01-11 07:20:15 +00:00
from . import getopenport
from .getopenport import get_open_port
2022-01-11 07:20:15 +00:00
import os
from shutil import which
def tor_binary():
"""Return tor binary path or none if not exists"""
tor_path = './tor'
if not os.path.exists(tor_path):
tor_path = which('tor')
return tor_path