We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 850a4b4 commit 65a4c2fCopy full SHA for 65a4c2f
pwnlib/tubes/ssh.py
@@ -1075,7 +1075,13 @@ def is_exe(path):
1075
1076
try:
1077
python.recvline_contains(b'PWNTOOLS') # Magic flag so that any sh/bash initialization errors are swallowed
1078
- if b'python' not in python.recvline(): # Python interpreter that was selected
+ try:
1079
+ if b'python' not in python.recvline(): # Python interpreter that was selected
1080
+ self.warn_once('Could not find a Python interpreter on %s\n' % self.host
1081
+ + "Use ssh.run() instead of ssh.process()\n")
1082
+ h.failure("Process creation failed")
1083
+ return None
1084
+ except (EOFError, ValueError):
1085
self.warn_once('Could not find a Python interpreter on %s\n' % self.host
1086
+ "Use ssh.system() instead of ssh.process()\n")
1087
h.failure("Process creation failed")
0 commit comments