> For the complete documentation index, see [llms.txt](https://www.heresecurity.wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.heresecurity.wiki/nei-wang-he-yu/ming-ling-yu-kong-zhi/jiao-hu-shi-shell.md).

# 交互式shell

```
>python2 -c 'import pty;pty.spawn("/bin/sh")'
>python3 -c "import pty;pty.spawn('/bin/bash')"
>expect -c 'spawn bash;interact'
```
