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