update str cast to prevent address assert issues

This commit is contained in:
mdr0id 2019-12-04 07:51:01 -08:00
parent 4403515487
commit 45915145cf
1 changed files with 2 additions and 1 deletions

View File

@ -1,3 +1,4 @@
#!/usr/bin/env python3
# Copyright (c) 2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://www.opensource.org/licenses/mit-license.php .
@ -102,7 +103,7 @@ class Socks5Connection(object):
addr = recvall(self.conn, 4)
elif atyp == AddressType.DOMAINNAME:
n = recvall(self.conn, 1)[0]
addr = str(recvall(self.conn, n))
addr = recvall(self.conn, n)
elif atyp == AddressType.IPV6:
addr = recvall(self.conn, 16)
else: