-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSH/SFTP FileNotFoundError Exception #2058
Comments
Monkey-patch that accomplishes that change: def _pwd_hack(self):
self.run("pwd", tty=False).recvall().strip()
ssh.pwd = _pwd_hack |
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 :/ |
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
The text was updated successfully, but these errors were encountered: