diff options
-rw-r--r-- | sploit/comm.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sploit/comm.py b/sploit/comm.py index b373762..67c97bc 100644 --- a/sploit/comm.py +++ b/sploit/comm.py @@ -46,11 +46,15 @@ class Comm: def readall_nonblock(self): try: + data = b'' os.set_blocking(self.back.stdin.fileno(), False) poll = select.poll() poll.register(self.back.stdin, select.POLLIN) - poll.poll(self.timeout) - return self.readall() + while True: + poll.poll(self.timeout) + d = self.readall() + if len(d) == 0: return data + data += d finally: os.set_blocking(self.back.stdin.fileno(), True) |