Gallopsled/pwntools

ssh proxy_sock is broken

Open

#1.787 aberto em 7 de fev. de 2021

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)Python (1.684 forks)batch import
backport-requiredbuggood first issue

Métricas do repositório

Stars
 (11.127 stars)
Métricas de merge de PR
 (Mesclagem média 18d 5h) (5 fundiu PRs em 30d)

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'

Guia do colaborador