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:
parent
797a9831d7
commit
c2c83ca058
@ -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="..."
|
||||
),
|
||||
)
|
||||
|
||||
|
@ -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")
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user