Open jacopotediosi opened 2 years ago
Monkey-patch that accomplishes that change:
def _pwd_hack(self):
self.run("pwd", tty=False).recvall().strip()
ssh.pwd = _pwd_hack
Has this issue been patched? Faced the same issue while I have the updated version of pwntools.
No, it has not
@Scoder12 did ssh work for you on pwn.college using the pwn.ssh module?
Mine keeps hanging and when I set logs to debug it logs that the connection was successful, logs the home directory and then the ssh connection is closed and hangs unless I Ctrl+C
No I ended up using raw paramiko :/ Check this repo: https://github.com/Scoder12/pwncollege-automation-template
This has been fixed in https://github.com/pwncollege/dojo/pull/101/commits and works now out of the box with pwntools.
Hi all, While solving pwn.college Capture The Flag challenges i got the following FileNotFoundError Exception connecting to dojo.pwn.college via SSH:
A.py script:
The error appears to have been introduced by this commit, which implements some new features including sftp.
The Dojo environment used by dojo.pwn.college prints "Connected!\r\n" every time a process is started, so self.pwd() returns "Connected!\r\n/home/hacker" instead of "/home/hacker".
An inelegant but functional fix might be replacing
with
I'm wondering also if the LocalContext
runner
function really needs to run commands with tty enabled. If not, maybe we can consider to disable tty there too.Although I understand that what I am presenting is a particular case, I think that fixing this issue could improve support for any other remote host using custom shells or whatever