From 31b68a2518fbee308048c1d02cb057b7b5119964 Mon Sep 17 00:00:00 2001 From: Caleb Stewart Date: Mon, 14 Jun 2021 22:36:14 -0400 Subject: [PATCH] During debugging, accidentally removed an exception Re-added commented exception handler that was removed for testing --- pwncat/modules/linux/enumerate/system/container.py | 8 ++++---- pwncat/platform/linux.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pwncat/modules/linux/enumerate/system/container.py b/pwncat/modules/linux/enumerate/system/container.py index c292c5f..eb18143 100644 --- a/pwncat/modules/linux/enumerate/system/container.py +++ b/pwncat/modules/linux/enumerate/system/container.py @@ -7,14 +7,14 @@ from pwncat.modules.enumerate import EnumerateModule class ContainerData(Fact): - def __init__(self, source, type): + def __init__(self, source, system): super().__init__(source=source, types=["system.container"]) - self.type: str = type + self.system: str = system """ what type of container? either docker or lxd """ def title(self, session): - return f"[yellow]{self.type}[/yellow]" + return f"[yellow]{self.system}[/yellow]" class Module(EnumerateModule): @@ -45,7 +45,7 @@ class Module(EnumerateModule): if proc.stdout: if proc.stdout.strip() != "": - yield "system.container", ContainerData(self.name, "docker") + yield ContainerData(self.name, "docker") return except CalledProcessError: diff --git a/pwncat/platform/linux.py b/pwncat/platform/linux.py index 2aa5a7a..bad4ed3 100644 --- a/pwncat/platform/linux.py +++ b/pwncat/platform/linux.py @@ -140,9 +140,9 @@ class PopenLinux(pwncat.subprocess.Popen): if result == b"" and self.stdout_raw.raw.eof: self._receive_returncode() return self.returncode - # except ValueError: - # self._receive_returncode() - # return self.returncode + except ValueError: + self._receive_returncode() + return self.returncode except BlockingIOError: return None