Skip to content

Commit

Permalink
Lookup netcat command too
Browse files Browse the repository at this point in the history
Co-authored-by: Xeonacid <[email protected]>
  • Loading branch information
peace-maker and Xeonacid authored Feb 1, 2025
1 parent 306a859 commit 6f25755
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pwnlib/tubes/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6f25755

Please sign in to comment.