1
0
mirror of https://github.com/calebstewart/pwncat.git synced 2024-11-23 17:15:38 +01:00

Fixed module search docstring and enumeration filter

This commit is contained in:
Caleb Stewart 2020-10-05 14:32:57 -04:00
parent 797a9831d7
commit c2c83ca058
2 changed files with 3 additions and 2 deletions

View File

@ -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="..."
),
)

View File

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