mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
Modified code in load for setting the Plaso module to off by default
This commit is contained in:
parent
936642bfc9
commit
df86ce32ae
@ -331,27 +331,35 @@ public final class IngestJobSettings {
|
||||
}
|
||||
|
||||
/**
|
||||
* Hardcoding Plaso to be disabled by default. Loaded modules is passed
|
||||
* below as the list default list of enabled modules so briefly
|
||||
* Hard coding Plaso to be disabled by default. loadedModuleNames is passed
|
||||
* below as the default list of enabled modules so briefly
|
||||
* remove Plaso from loaded modules to get the list of enabled and
|
||||
* disabled modules. Then put Plaso back into loadedModulesNames to let
|
||||
* disabled modules names. Then put Plaso back into loadedModulesNames to let
|
||||
* the rest of the code continue as before.
|
||||
*/
|
||||
HashSet<String> hardCodedDisabledModules = new HashSet<>();
|
||||
if(loadedModuleNames.contains("Plaso")) {
|
||||
loadedModuleNames.remove("Plaso");
|
||||
hardCodedDisabledModules.add("Plaso");
|
||||
final String plasoModuleName = "Plaso";
|
||||
boolean plasoLoaded = loadedModuleNames.contains(plasoModuleName);
|
||||
if (plasoLoaded) {
|
||||
loadedModuleNames.remove(plasoModuleName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the enabled/disabled ingest modules settings for this context. By
|
||||
* default, all loaded modules are enabled.
|
||||
* default, all loaded modules except Plaso are enabled.
|
||||
*/
|
||||
HashSet<String> enabledModuleNames = getModulesNames(executionContext, IngestJobSettings.ENABLED_MODULES_PROPERTY, makeCsvList(loadedModuleNames));
|
||||
HashSet<String> disabledModuleNames = getModulesNames(executionContext, IngestJobSettings.DISABLED_MODULES_PROPERTY, hardCodedDisabledModules.isEmpty() ? "" : makeCsvList(hardCodedDisabledModules)); //NON-NLS
|
||||
HashSet<String> disabledModuleNames = getModulesNames(executionContext, IngestJobSettings.DISABLED_MODULES_PROPERTY, plasoModuleName); //NON-NLS
|
||||
|
||||
// If plaso was loaded, but appears in neither the enabled nor the
|
||||
// disabled list, add it to the disabled list.
|
||||
if (!enabledModuleNames.contains(plasoModuleName) && !disabledModuleNames.contains(plasoModuleName)) {
|
||||
disabledModuleNames.add(plasoModuleName);
|
||||
}
|
||||
|
||||
//Put plaso back into loadedModuleNames
|
||||
loadedModuleNames.addAll(hardCodedDisabledModules);
|
||||
if (plasoLoaded) {
|
||||
loadedModuleNames.add(plasoModuleName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for missing modules and create warnings if any are found.
|
||||
|
Loading…
x
Reference in New Issue
Block a user