TTY shells
Spawn shells
Python:
python -c 'import pty; pty.spawn("/bin/sh")'Bash:
echo os.system('/bin/bash')Bash:
/bin/sh -iBash:
script -qc /bin/bash /dev/nullPerl:
perl -e 'exec "/bin/sh";'Perl:
exec "/bin/sh";Ruby:
exec "/bin/sh"Lua:
os.execute('/bin/sh')IRB:
exec "/bin/sh"vi:
:!bashvi:
:set shell=/bin/bash:shellNmap:
!sh
No TTY
If you cannot obtain a full TTY, you can still interact with programs that expect user input. In the following example, the password is passed to sudo read a file:
Last updated