summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordusoleil <howcansocksbereal@gmail.com>2021-09-01 00:56:40 -0400
committerdusoleil <howcansocksbereal@gmail.com>2021-09-01 00:56:40 -0400
commita5d0003aa8f3f14076945a9a01ea23915be874dc (patch)
treecba7ccedd874470c42162f13ec9ead6069f72459
parent0aad1e71f0bc1343d9d41c19709458e9131c19fc (diff)
downloadlib-des-gnux-a5d0003aa8f3f14076945a9a01ea23915be874dc.tar.gz
lib-des-gnux-a5d0003aa8f3f14076945a9a01ea23915be874dc.zip
Throw a BrokenPipeError on Broken Read
Signed-off-by: dusoleil <howcansocksbereal@gmail.com>
-rw-r--r--tools/sploit/sploit/comm.py4
1 files changed, 4 insertions, 0 deletions
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