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:
parent
64dcae2f0b
commit
31b68a2518
@ -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:
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user