0
0
mirror of https://codeberg.org/crimeflare/cloudflare-tor synced 2024-11-05 00:42:45 +00:00

globalist: IDEA to implement Tor ControlPort authentication

This commit is contained in:
traumschule 2018-10-04 03:00:23 +02:00
parent bbeea90150
commit 2daa832880
2 changed files with 7 additions and 0 deletions

View File

@ -336,6 +336,12 @@ def main(args=[]):
opt.add_option("-C", "--control-port", dest="a_controlport", action="store", type="int",
default=9151, metavar="PORT", help="Tor controlport")
# opt.add_option("-CP", "--control-password", dest="a_controlpassword", action="store", type="int",
# default="", help="Tor Control Password")
# opt.add_option("-CC", "--control-cookie", dest="a_controlcookie", action="store", type="int",
# default="", help="Tor Control Cookie")
opt.add_option("-a", "--await", dest="o_ap", action="store_true",
default=False, help="await publication of .onion in DHT before proceeding")
@ -362,6 +368,7 @@ def main(args=[]):
options.a_controlport = DEFAULT_CONTROLPORT
# Extract socksport via c.get_conf and use this (-P in torsocks)
# TODO implement authentication token / cookie
controller = Controller.from_port(port = options.a_controlport)
controller.authenticate()
STATUS['socksport'] = controller.get_conf('SocksPort').split(" ",1)[0]