Skip to content

Commit 9f072e3

Browse files
authored
Fix BytesWarning in ssh.interactive() (#2218)
When the current working directory was changed, `interactive()` changes into that directory using `cd X` which wasn't encoded.
1 parent 8c62a58 commit 9f072e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pwnlib/tubes/ssh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1766,7 +1766,7 @@ def interactive(self, shell=None):
17661766

17671767
if self.cwd != '.':
17681768
cmd = 'cd ' + sh_string(self.cwd)
1769-
s.sendline(cmd)
1769+
s.sendline(packing._need_bytes(cmd, 2, 0x80))
17701770

17711771
s.interactive()
17721772
s.close()

0 commit comments

Comments
 (0)