diff options
author | dusoleil <howcansocksbereal@gmail.com> | 2021-09-02 00:40:13 -0400 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2021-09-02 00:40:13 -0400 |
commit | da2af8c7a93f528a225672ebfae652ebfc6a78bf (patch) | |
tree | 4b35fa1752c42304479e8d71faf3eb2a4e940d7b | |
parent | 6815af7a8dfb3bf5f4d0495fc37ad013da9ba93a (diff) | |
download | lib-des-gnux-da2af8c7a93f528a225672ebfae652ebfc6a78bf.tar.gz lib-des-gnux-da2af8c7a93f528a225672ebfae652ebfc6a78bf.zip |
Add readall() which reads until EOF
Signed-off-by: dusoleil <howcansocksbereal@gmail.com>
-rw-r--r-- | tools/sploit/sploit/comm.py | 7 | ||||
-rw-r--r-- | tools/sploit/sploit/main.py | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/tools/sploit/sploit/comm.py b/tools/sploit/sploit/comm.py index 1b8ba7f..223b639 100644 --- a/tools/sploit/sploit/comm.py +++ b/tools/sploit/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) diff --git a/tools/sploit/sploit/main.py b/tools/sploit/sploit/main.py index ee0495f..0bc799e 100644 --- a/tools/sploit/sploit/main.py +++ b/tools/sploit/sploit/main.py @@ -55,6 +55,5 @@ def runscript(script, comm): print("Running Script...") exec(open(script).read()) print("Script Finished!") - for line in comm.back.stdin: - log(line) + comm.readall() |