diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/sploit/sploit/comm.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/sploit/sploit/comm.py b/tools/sploit/sploit/comm.py index 009f193..9b68c38 100644 --- a/tools/sploit/sploit/comm.py +++ b/tools/sploit/sploit/comm.py @@ -22,6 +22,20 @@ class Comm: log(data) return data + def readuntil(self,pred): + data = b'' + while(not pred(data)): + data += self.back.stdin.read(1) + log(data) + return data + + def readlineuntil(self,pred): + data = b'' + while(not pred(data)): + data = self.back.stdin.readline() + log(data) + return data + def write(self, data): self.back.stdout.write(data) self.back.stdout.flush() |