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:
parent
c03d6aaba5
commit
7ca5d93c96
@ -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
|
||||
|
||||
|
@ -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):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user