GitBook: [master] one page modified

This commit is contained in:
CPol 2020-08-14 20:07:50 +00:00 committed by gitbook-bot
parent a7e72c1b6e
commit 889e70a401
No known key found for this signature in database
GPG key ID: 07D2180C7B12D0FF

View file

@ -79,6 +79,14 @@ script -qc /bin/bash /dev/null
(inside the nc session) CTRL+Z;stty raw -echo; fg; ls; export SHELL=/bin/bash; export TERM=screen; stty rows 38 columns 116; reset; (inside the nc session) CTRL+Z;stty raw -echo; fg; ls; export SHELL=/bin/bash; export TERM=screen; stty rows 38 columns 116; reset;
``` ```
## No TTY
If for some reason you cannot obtain a full TTY you **still can interact with programs** that expects user input. In the following example, the password is passed to `sudo` to read a file:
```bash
expect -c 'spawn sudo -S cat "/root/root.txt";expect "*password*";send "<THE_PASSWORD_OF_THE_USER>";send "\r\n";interact'
```
## Perl ## Perl
```bash ```bash