#1471 - fix class deprecation and update other plugins

This commit is contained in:
Dave Lassalle
2025-03-26 17:53:19 -05:00
parent f431f519b6
commit ef29008cc8
5 changed files with 31 additions and 46 deletions
+3 -2
View File
@@ -121,7 +121,7 @@ class PluginRenameClass:
deprecated_class_name = f"{cls.__module__}.{cls.__qualname__}"
super().__init_subclass__(**kwargs)
for attr, value in replacement_class.__dict__.items():
if isinstance(value, classmethod):
if isinstance(value, classmethod) and attr != "get_requirements":
setattr(
cls,
attr,
@@ -134,5 +134,6 @@ class PluginRenameClass:
),
)
else:
setattr(cls, attr, value)
if not attr.startswith("__"):
setattr(cls, attr, value)
return super(replacement_class).__init_subclass__(**kwargs)
@@ -2,23 +2,19 @@
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
#
import logging
import warnings
from volatility3.framework import interfaces, deprecation
from volatility3.plugins.windows.registry import cachedump
vollog = logging.getLogger(__name__)
class Cachedump(cachedump.Cachedump):
class Cachedump(
interfaces.plugins.PluginInterface,
deprecation.PluginRenameClass,
replacement_class=cachedump.Cachedump,
removal_date="2025-09-25",
):
"""Dumps lsa secrets from memory (deprecated)"""
_required_framework_version = (2, 0, 0)
_version = (1, 0, 2)
def __getattribute__(self, *args, **kwargs):
warnings.warn(
FutureWarning(
"The windows.cachedump.Cachedump plugin is deprecated and will be removed on "
"2025-09-25. Use windows.registry.cachedump.Cachedump instead."
)
)
return super().__getattribute__(*args, **kwargs)
@@ -2,23 +2,19 @@
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
#
import logging
import warnings
from volatility3.framework import interfaces, deprecation
from volatility3.plugins.windows.registry import hashdump
vollog = logging.getLogger(__name__)
class Hashdump(hashdump.Hashdump):
class Hashdump(
interfaces.plugins.PluginInterface,
deprecation.PluginRenameClass,
replacement_class=hashdump.Hashdump,
removal_date="2025-09-25",
):
"""Dumps user hashes from memory (deprecated)"""
_required_framework_version = (2, 0, 0)
_version = (1, 1, 1)
def __getattribute__(self, *args, **kwargs):
warnings.warn(
FutureWarning(
"The windows.hashdump.Hashdump plugin is deprecated and will be removed on "
"2025-09-25. Use windows.registry.hashdump.Hashdump instead."
)
)
return super().__getattribute__(*args, **kwargs)
@@ -2,23 +2,19 @@
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
#
import logging
import warnings
from volatility3.framework import interfaces, deprecation
from volatility3.plugins.windows.registry import lsadump
vollog = logging.getLogger(__name__)
class Lsadump(lsadump.Lsadump):
class Lsadump(
interfaces.plugins.PluginInterface,
deprecation.PluginRenameClass,
replacement_class=lsadump.Lsadump,
removal_date="2025-09-25",
):
"""Dumps lsa secrets from memory (deprecated)"""
_required_framework_version = (2, 0, 0)
_version = (1, 0, 1)
def __getattribute__(self, *args, **kwargs):
warnings.warn(
FutureWarning(
"The windows.lsadump.Lsadump plugin is deprecated and will be removed on "
"2025-09-25. Use windows.registry.lsadump.Lsadump instead."
)
)
return super().__getattribute__(*args, **kwargs)
@@ -2,24 +2,20 @@
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
#
import logging
import warnings
from volatility3.framework import interfaces, deprecation
from volatility3.plugins.windows.registry import scheduled_tasks
vollog = logging.getLogger(__name__)
class ScheduledTasks(scheduled_tasks.ScheduledTasks):
class ScheduledTasks(
interfaces.plugins.PluginInterface,
deprecation.PluginRenameClass,
replacement_class=scheduled_tasks.ScheduledTasks,
removal_date="2025-09-25",
):
"""Decodes scheduled task information from the Windows registry, including
information about triggers, actions, run times, and creation times (deprecated)."""
_required_framework_version = (2, 11, 0)
_version = (2, 0, 0)
def __getattribute__(self, *args, **kwargs):
warnings.warn(
FutureWarning(
"The windows.registry.scheduled_tasks.ScheduledTasks plugin is deprecated and will be removed on "
"2025-09-25. Use windows.registry.scheduled_tasks.ScheduledTasks instead."
)
)
return super().__getattribute__(*args, **kwargs)