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 /sploit/comm.py | |
parent | 263ef1e02c93f81bd5f3bcad9138b1ab246f124c (diff) | |
download | nsploit-ad0e943147ac6fb724f8f57fd83d65f90e20ba05.tar.gz nsploit-ad0e943147ac6fb724f8f57fd83d65f90e20ba05.zip |
Add readall() which reads until EOF
Signed-off-by: dusoleil <howcansocksbereal@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | sploit/comm.py | 7 |
1 files changed, 7 insertions, 0 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) |