Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pwn.ssh can't work well on server with python2 #2438

Open
brealid opened this issue Aug 9, 2024 · 0 comments
Open

pwn.ssh can't work well on server with python2 #2438

brealid opened this issue Aug 9, 2024 · 0 comments

Comments

@brealid
Copy link

brealid commented Aug 9, 2024

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:

        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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant