Gallopsled / Gallopsled/pwntools
ssh proxy_sock is broken
- Dominant language
- Python
- Stars
- 13.7k
- Forks
- 1.9k
- Avg merge
- 6d 23h
- Merged PRs (30d)
- 3
Description
It appears that the SSH option `proxy_sock` does not work.
## Works
```py
>>> ssh(host='example.pwnme').whoami()
b'travis'
```
## Does not work
```py
>>> r = remote('localhost', 22)
>>> ssh(host='example.pwnme', proxy_sock=r.sock).whoami()
...
AuthenticationException: Authentication failed.
```
## Works but should not work
It appears that there is some state in the `remote` that is bugged. When doing `proxy_sock=r` first, then `proxy_sock=r.sock`, everything works.
```py
>>> r = remote('localhost', 22)
>>> ssh(host='example.pwnme', proxy_sock=r).whoami()
...
TypeError: '<' not supported between instances of 'NoneType' and 'int'
>>> ssh(host='example.pwnme', proxy_sock=r.sock).whoami()
b'travis'
```
Contributor guide
Research direction
Reproduce the two SSH examples using remote('localhost', 22), then trace the ssh(host=..., proxy_sock=...) and remote/r.sock entry points to find where proxy socket state is handled. Done means proxy_sock=r.sock works directly without first passing proxy_sock=r, with regression coverage for both the failing and working cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100