From a5d0003aa8f3f14076945a9a01ea23915be874dc Mon Sep 17 00:00:00 2001 From: dusoleil Date: Wed, 1 Sep 2021 00:56:40 -0400 Subject: Throw a BrokenPipeError on Broken Read Signed-off-by: dusoleil --- tools/sploit/sploit/comm.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/sploit/sploit/comm.py b/tools/sploit/sploit/comm.py index 1f55fb6..fc220ef 100644 --- a/tools/sploit/sploit/comm.py +++ b/tools/sploit/sploit/comm.py @@ -14,11 +14,15 @@ class Comm: def read(self, size): data = self.back.stdin.read(size) + if(data == b''): + raise BrokenPipeError('Tried to read on broken pipe') log(data) return data def readline(self): data = self.back.stdin.readline() + if(data == b''): + raise BrokenPipeError('Tried to read on broken pipe') log(data) return data -- cgit v1.2.3