Gallopsled / Gallopsled/pwntools
pwn.ssh can't work well on server with python2
Open
backport-required
bug
- Dominant language
- Python
- Stars
- 13.7k
- Forks
- 1.9k
- Avg merge
- 6d 23h
- Merged PRs (30d)
- 3
Description
## Version
`pwntools==4.12.0`
## Description
When I try to use `pwn.ssh` to connect to a server (let's call it SA), the process gets stuck and keeps waiting indefinitely.
Upon investigation, I discovered that in `ssh.py`, line 945, the script being executed on SA is as follows:
```python
script = r"""
#!/usr/bin/env python
import os, sys, ctypes, resource, platform, stat
```
This script does not explicitly specify the use of Python 3. When I logged into SA, I found that `/usr/bin/env python` indeed calls Python 2, not Python 3.
To resolve this, I suggest renaming `python` to `python3` in this script.
Contributor guide
Assessment
This issue has not been assessed yet.