Skip to content

Instantly share code, notes, and snippets.

@sigmapie8
Created June 13, 2017 11:37
Show Gist options
  • Save sigmapie8/f5179a45aa4adc3fc7a24599c8a5d543 to your computer and use it in GitHub Desktop.
Save sigmapie8/f5179a45aa4adc3fc7a24599c8a5d543 to your computer and use it in GitHub Desktop.
from stem.process import launch_tor
import os
def print_lines(line):
if("Bootstrapped" in line):
print(line)
tor_path = os.path.join("<absolute path>\\Tor Browser\\Browser\\TorBrowser\\Tor", "tor.exe")
tor = launch_tor(tor_cmd = tor_path, init_msg_handler = print_lines)
tor.terminate()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment