GOTCHA - The SSH-TTY control Interface
I have been working on a solution to mirror the š¬šš«ššš§ of another user's terminals. As part of that, I need a way to execute commands on another ššš²/š©šš¬. A simple ššš”šØ won't work because ššš”šØ writes to the output buffer, while I need to push these commands to the input buffer of the ššš²/š©šš¬.
I found these š«šš©šØš¬ after some googling.
https://github.com/d-tsuji/ttycopy
https://github.com/nopernik/sshpry
https://github.com/nopernik/SSHPry2.0
To accomplish this. The previous code was adapted as follows;
#devsecops #linux #strace #python3
https://pypi.org/project/ttyGotcha/
::
āāāāāāā āāāāāāā āāāāāāāāā āāāāāāāāāā āāā āāāāāā āāāāāāāāā
āāāāāāāā āāāāāāāāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāā
āāā āāāāāāā āāā āāā āāā āāāāāāāāāāāāāāāāāāāāāāāāā
āāā āāāāāā āāā āāā āāā āāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāā āāā āāāāāāāāāāā āāāāāā āāāāāāāāāāāā
āāāāāāā āāāāāāā āāā āāāāāāāāāā āāāāāā āāāāāāāāāāāā
SSH-TTY control
Usage: GOTCHA [OPTIONS]
Args: --auto # Lazy mode, auto-attach to first found session.
--list # List available SSH Sessions.
--tty /dev/pts/XX # Point GOTCHA to specific TTY.
--replay <file> # Play previously recorded session.
--speed 4 # Replay speed multiplier (Default: 4).
----- root privileges required! -----
Usage
$ sudo su
$ gotcha --auto
Installation
Requirements::
Linux syscall tracer (strace) and root privileges required!
From pypi::
pip3 install ttyGotcha
From source::
git clone https://github.com/caputomarcos/gotcha.git
cd gotcha
python setup.py install
Community Distributions
Feel free! All contributions are welcome.