mirror of
https://github.com/sshuttle/sshuttle.git
synced 2024-11-21 15:33:23 +01:00
windows: ignore netstat output encoding errors
This commit is contained in:
parent
554b8e3ae5
commit
df9625bbfd
@ -294,7 +294,7 @@ class Method(BaseMethod):
|
||||
|
||||
def _get_bind_address_for_port(self, port, family):
|
||||
proto = "TCPv6" if family.version == 6 else "TCP"
|
||||
for line in subprocess.check_output(["netstat", "-a", "-n", "-p", proto]).decode().splitlines():
|
||||
for line in subprocess.check_output(["netstat", "-a", "-n", "-p", proto]).decode(errors='ignore').splitlines():
|
||||
try:
|
||||
_, local_addr, _, state, *_ = re.split(r"\s+", line.strip())
|
||||
except ValueError:
|
||||
|
Loading…
Reference in New Issue
Block a user