From ad0e943147ac6fb724f8f57fd83d65f90e20ba05 Mon Sep 17 00:00:00 2001 From: dusoleil Date: Thu, 2 Sep 2021 00:40:13 -0400 Subject: Add readall() which reads until EOF Signed-off-by: dusoleil --- sploit/comm.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sploit/comm.py') diff --git a/sploit/comm.py b/sploit/comm.py index 1b8ba7f..223b639 100644 --- a/sploit/comm.py +++ b/sploit/comm.py @@ -28,6 +28,13 @@ class Comm: if self.logonread : log(data) return data + def readall(self): + data = b'' + for line in self.back.stdin: + log(line) + data += line + return data + def readuntil(self, pred, /, *args, **kwargs): data = b'' pred = bind(pred, *args, **kwargs) -- cgit v1.2.3