From d329e8882a579ca5912a3ae47f01ed46f1343fff Mon Sep 17 00:00:00 2001 From: Caleb Stewart Date: Sun, 4 Oct 2020 18:15:38 -0400 Subject: [PATCH] Fixed escalate.auto file read --- pwncat/modules/escalate/auto.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pwncat/modules/escalate/auto.py b/pwncat/modules/escalate/auto.py index da34c66..8a5cb2f 100644 --- a/pwncat/modules/escalate/auto.py +++ b/pwncat/modules/escalate/auto.py @@ -95,16 +95,7 @@ class Module(BaseModule): return elif read: yield Status(f"attempting file read as {target_user}") - filp = result.read(target_user, path, self.progress) - original_close = filp.close - - # We need to call unwrap after reading the data - def close_wrapper(): - original_close() - whole_chain.unwrap() - - filp.close = close_wrapper - + filp, _ = result.read(target_user, path, self.progress) yield FileContentsResult(path, filp) return else: