Gallopsled/pwntools

ssh proxy_sock is broken

Open

#1 787 ouverte le 7 févr. 2021

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)Python (1 684 forks)batch import
backport-requiredbuggood first issue

Métriques du dépôt

Stars
 (11 127 stars)
Métriques de merge PR
 (Merge moyen 18j 5h) (5 PRs mergées en 30 j)

Description

It appears that the SSH option proxy_sock does not work.

Works

>>> ssh(host='example.pwnme').whoami()
b'travis'

Does not work

>>> 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.

>>> 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'

Guide contributeur