1
0
mirror of https://github.com/calebstewart/pwncat.git synced 2024-11-24 01:25:37 +01:00

During debugging, accidentally removed an exception

Re-added commented exception handler that was removed for testing
This commit is contained in:
Caleb Stewart 2021-06-14 22:36:14 -04:00
parent 64dcae2f0b
commit 31b68a2518
2 changed files with 7 additions and 7 deletions

View File

@ -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:

View File

@ -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