unpackOnionAddress Py3 support
This commit is contained in:
parent
d4d86172f0
commit
a42dee5a44
1 changed files with 1 additions and 1 deletions
|
@ -111,7 +111,7 @@ def packOnionAddress(onion, port):
|
||||||
|
|
||||||
# From 12byte format to ip, port
|
# From 12byte format to ip, port
|
||||||
def unpackOnionAddress(packed):
|
def unpackOnionAddress(packed):
|
||||||
return base64.b32encode(packed[0:-2]).lower() + ".onion", struct.unpack("H", packed[-2:])[0]
|
return base64.b32encode(packed[0:-2]).lower().decode() + ".onion", struct.unpack("H", packed[-2:])[0]
|
||||||
|
|
||||||
|
|
||||||
# Get dir from file
|
# Get dir from file
|
||||||
|
|
Loading…
Reference in a new issue