mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-15 09:27:32 +00:00
GitBook: [master] one page modified
This commit is contained in:
parent
a7e72c1b6e
commit
889e70a401
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue