Skip to content

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

Open
@brealid

Description

@brealid

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions