From 6f25755d791133c3ffd292304d49d4c4ebb8e088 Mon Sep 17 00:00:00 2001 From: peace-maker Date: Sat, 1 Feb 2025 02:02:57 +0100 Subject: [PATCH] Lookup `netcat` command too Co-authored-by: Xeonacid --- pwnlib/tubes/ssh.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pwnlib/tubes/ssh.py b/pwnlib/tubes/ssh.py index b39026f0f..572b6a0f0 100644 --- a/pwnlib/tubes/ssh.py +++ b/pwnlib/tubes/ssh.py @@ -464,8 +464,10 @@ def __init__(self, parent, host, port, *a, **kw): ncat = 'nc' elif parent.which('ncat'): ncat = 'ncat' + elif parent.which('netcat'): + ncat = 'netcat' else: - self.exception('Could not find ncat or nc on remote. Cannot connect to remote port.') + self.exception('Could not find ncat, nc or netcat on remote. Cannot connect to remote port.') raise self.tunnel = parent.process([ncat, host, str(port)]) self.sock = self.tunnel.sock