Onionr/src/netcontroller/__init__.py

12 lines
286 B
Python
Executable File

from . import getopenport
from .getopenport import get_open_port
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