Rev1833, Fix utf8 system paths

This commit is contained in:
shortcutme 2017-01-22 21:22:53 +01:00
parent 6a46181e8e
commit a0c3d7f8a6
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
7 changed files with 45 additions and 25 deletions

View file

@ -160,7 +160,7 @@ class TorManager:
res_protocol = self.send("PROTOCOLINFO", conn)
cookie_match = re.search('COOKIEFILE="(.*?)"', res_protocol)
if cookie_match:
cookie_file = cookie_match.group(1)
cookie_file = cookie_match.group(1).decode("string-escape")
auth_hex = binascii.b2a_hex(open(cookie_file, "rb").read())
res_auth = self.send("AUTHENTICATE %s" % auth_hex, conn)
elif config.tor_password: