windows eprocess validation: Make the creation and exit year checks dynamic

This commit is contained in:
Gustavo Moreira
2024-07-15 20:22:40 +10:00
parent fcc9eab471
commit a6d8ba8bfa
@@ -614,12 +614,13 @@ class EPROCESS(generic.GenericIntelProcess, pool.ExecutiveObject):
# A process must have a creation time
return False
if not (1998 < ctime.year < 2030):
current_year = datetime.datetime.now().year
if not (1998 < ctime.year < current_year + 10):
return False
etime = self.get_exit_time()
if isinstance(etime, datetime.datetime):
if not (1998 < etime.year < 2030):
if not (1998 < etime.year < current_year + 10):
return False
# Exit time, if available, must be after the creation time