1
0
mirror of https://github.com/calebstewart/pwncat.git synced 2024-11-27 19:04:15 +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()
""" 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()
""" Execute the enumeration once per user on the target """
ONCE = auto()
@ -191,7 +193,7 @@ class EnumerateModule(BaseModule):
for item in self.enumerate(session):
# Allow non-fact status updates
if isinstance(item, Status):
if isinstance(item, Status) or self.SCHEDULE == Schedule.NOSAVE:
yield item
continue

View File

@ -114,7 +114,8 @@ class Module(EnumerateModule):
PROVIDES = ["system.processes"]
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):