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