From c2c83ca05857a789229dd9ab50b615b31e21310b Mon Sep 17 00:00:00 2001 From: Caleb Stewart Date: Mon, 5 Oct 2020 14:32:57 -0400 Subject: [PATCH] Fixed module search docstring and enumeration filter --- pwncat/commands/search.py | 3 ++- pwncat/modules/enumerate/__init__.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pwncat/commands/search.py b/pwncat/commands/search.py index ae873d6..42a13b1 100644 --- a/pwncat/commands/search.py +++ b/pwncat/commands/search.py @@ -33,10 +33,11 @@ class Command(CommandDefinition): # white space and remove newlines. `textwrap.shorten` is # the easiest way to do that, so we use a large size for # width. + description = module.__doc__ if module.__doc__ is not None else "" table.add_row( f"[cyan]{module.name}[/cyan]", textwrap.shorten( - module.__doc__.replace("\n", " "), width=200, placeholder="..." + description.replace("\n", " "), width=200, placeholder="..." ), ) diff --git a/pwncat/modules/enumerate/__init__.py b/pwncat/modules/enumerate/__init__.py index 0b96300..253120a 100644 --- a/pwncat/modules/enumerate/__init__.py +++ b/pwncat/modules/enumerate/__init__.py @@ -78,7 +78,7 @@ class EnumerateModule(BaseModule): # Yield all the know facts which have already been enumerated existing_facts = ( pwncat.victim.session.query(pwncat.db.Fact) - .filter_by(source=self.name) + .filter_by(source=self.name, host_id=pwncat.victim.host.id) .filter(pwncat.db.Fact.type != "marker") )