From 5fc3b61980e3f964b4d3834d31844ccb76986ba4 Mon Sep 17 00:00:00 2001 From: dusoleil Date: Sat, 18 Feb 2023 14:29:05 -0500 Subject: Read once at the beginning of interact mode. This behavior was accidentally removed in dcba5f2 interact mode works by polling for IO events, but it will miss any unread data already in the buffer when it is first entered. We can ensure this gets caught by just doing a read once at the beginning. Signed-off-by: dusoleil --- sploit/comm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sploit/comm.py b/sploit/comm.py index f1415bc..8c46f1d 100644 --- a/sploit/comm.py +++ b/sploit/comm.py @@ -120,6 +120,7 @@ class Comm: poll.register(self.back.stdin, event) poll.register(stdin, event) + readtable[self.back.stdin.fileno()]() while True: for fd, e in poll.poll(self.timeout): if not e & event: return -- cgit v1.2.3