Crash by use --auto parameter
tomtactom opened this issue · comments
Tom commented
Hello,
If I'll use the --auto parameter, the programm crash with the following Error-Code:
user@test:~/test/SSHPry2.0$ sudo python sshpry2.py
SSHPry2 SSH-TTY control by @nopernik 2017
Usage: sshpry2.py [OPTIONS]
Args: --auto # Lazy mode, auto-attach to first found session
--list # List available SSH Sessions
--tty /dev/pts/XX # Point SSHPry to specific TTY
--raw # Record and Play raw term output, no timing.
--replay <file> # Replace previously recorded session.
--speed 4 # Replay speed multiplier (Default: 4).
----- root privileges required! -----
user@test:~/test/SSHPry2.0$ sudo python sshpry2.py --list
SSHPry2 SSH-TTY control by @nopernik 2017
[+] Getting available ssh connections...
[+] Found active SSH connections:
PID: 21508 | TTY: /dev/pts/1 (user)
[!] Choose yours with "--tty TTY" switch
user@test:~/test/SSHPry2.0$ sudo python sshpry2.py --auto
SSHPry2 SSH-TTY control by @nopernik 2017
[+] Getting available ssh connections...
[+] Found active SSH connections:
PID: 21508 | TTY: /dev/pts/1 (user)
[+] -- Lazy mode activated -- :-)
[+] Target TTY keystrokes file: 'keys-2020-03-24-1931.sshpry.log'
[+] Target TTY session file: 'sess-2020-03-24-1931.sshpry.log'
[+] Attaching to 21508 at /dev/pts/1...
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "sshpry2.py", line 105, in PryonTTY
sshpipe = Popen(['strace', '-s', '16384', '-p', z.pid, '-e', 'read,write'], shell=False, stdout=PIPE, stderr=PIPE)
File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Can anybody help me?
Korznikov Alexander commented
Do you have strace
installed?
Try: strace -h
Tom commented
Thank you. It was not installt.
sudo apt install strace