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 | ad0e943147ac6fb724f8f57fd83d65f90e20ba05 (patch) | |
tree | f780966fbb0a07f66596b78f5e6acb8cb79be8d3 | |
parent | 263ef1e02c93f81bd5f3bcad9138b1ab246f124c (diff) | |
download | sploit-ad0e943147ac6fb724f8f57fd83d65f90e20ba05.tar.gz sploit-ad0e943147ac6fb724f8f57fd83d65f90e20ba05.zip |
Add readall() which reads until EOF
Signed-off-by: dusoleil <howcansocksbereal@gmail.com>
-rw-r--r-- | sploit/comm.py | 7 | ||||
-rw-r--r-- | sploit/main.py | 3 |
2 files changed, 8 insertions, 2 deletions
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) diff --git a/sploit/main.py b/sploit/main.py index ee0495f..0bc799e 100644 --- a/sploit/main.py +++ b/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() |