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

Added Schedule.NOSAVE enumeration schedule

This commit is contained in:
Caleb Stewart 2021-06-06 23:04:23 -04:00
parent c03d6aaba5
commit 7ca5d93c96
2 changed files with 5 additions and 2 deletions

View File

@ -68,6 +68,8 @@ class Schedule(Enum):
ALWAYS = auto() ALWAYS = auto()
""" Execute the enumeration every time the module is executed """ """ Execute the enumeration every time the module is executed """
NOSAVE = auto()
""" Similar to always, except that no enumerated information will be saved to the database """
PER_USER = auto() PER_USER = auto()
""" Execute the enumeration once per user on the target """ """ Execute the enumeration once per user on the target """
ONCE = auto() ONCE = auto()
@ -191,7 +193,7 @@ class EnumerateModule(BaseModule):
for item in self.enumerate(session): for item in self.enumerate(session):
# Allow non-fact status updates # Allow non-fact status updates
if isinstance(item, Status): if isinstance(item, Status) or self.SCHEDULE == Schedule.NOSAVE:
yield item yield item
continue continue

View File

@ -114,7 +114,8 @@ class Module(EnumerateModule):
PROVIDES = ["system.processes"] PROVIDES = ["system.processes"]
PLATFORM = [Windows] PLATFORM = [Windows]
SCHEDULE = Schedule.ALWAYS # We don't save process results. They're volatile. Maybe this should be `Schedule.ALWAYS` anyway though? :shrug:
SCHEDULE = Schedule.NOSAVE
def enumerate(self, session): def enumerate(self, session):