Skip to content

Instantly share code, notes, and snippets.

@sigmapie8
Created June 13, 2017 10:43
Show Gist options
  • Save sigmapie8/948c1d86794d20112c9b4c3a315dc7e5 to your computer and use it in GitHub Desktop.
Save sigmapie8/948c1d86794d20112c9b4c3a315dc7e5 to your computer and use it in GitHub Desktop.
import stem
from stem.process import launch_tor_with_config
def print_lines(line):
if('Bootstapped' in line):
print(line)
tor = launch_tor_with_config(config = {'ControlPort': '9051'}, 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