diff options
Diffstat (limited to 'tools/sploit/sploit/comm.py')
-rw-r--r-- | tools/sploit/sploit/comm.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/sploit/sploit/comm.py b/tools/sploit/sploit/comm.py index 0bc8c6a..afa14e8 100644 --- a/tools/sploit/sploit/comm.py +++ b/tools/sploit/sploit/comm.py @@ -41,11 +41,13 @@ class Comm: pred = bind(pred, *args, **kwargs) l = self.logonread self.logonread = False - while(True): - data += self.read(1) - if(pred(data)): - break - self.logonread = l + try: + while(True): + data += self.read(1) + if(pred(data)): + break + finally: + self.logonread = l if self.logonread : ilog(data, file=sys.stdout, color=NORMAL) return data |