From b7be944a0b51f6321656708473321579a3df691e Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Tue, 8 Jan 2019 14:44:11 -0500 Subject: [PATCH] 4590 rename artifact and attribute for data source usage --- .../autopsy/datamodel/ExtractedContent.java | 3 +- ...iler.java => DataSourceUsageAnalyzer.java} | 8 ++--- .../recentactivity/RAImageIngestModule.java | 30 +++++++++---------- 3 files changed, 20 insertions(+), 21 deletions(-) rename RecentActivity/src/org/sleuthkit/autopsy/recentactivity/{DataSourceProfiler.java => DataSourceUsageAnalyzer.java} (92%) diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java b/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java index c3689f1eaa..9badce1a64 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ExtractedContent.java @@ -37,7 +37,6 @@ import org.openide.util.lookup.Lookups; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.CasePreferences; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; -import org.sleuthkit.autopsy.core.UserPreferences; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.autopsy.ingest.ModuleDataEvent; @@ -236,7 +235,7 @@ public class ExtractedContent implements AutopsyVisitableItem { doNotShow.add(new BlackboardArtifact.Type(TSK_INTERESTING_FILE_HIT)); doNotShow.add(new BlackboardArtifact.Type(TSK_INTERESTING_ARTIFACT_HIT)); doNotShow.add(new BlackboardArtifact.Type(TSK_ACCOUNT)); - doNotShow.add(new BlackboardArtifact.Type(TSK_DATA_SOURCE_PROFILE)); + doNotShow.add(new BlackboardArtifact.Type(TSK_DATA_SOURCE_USAGE)); } private final PropertyChangeListener pcl = (PropertyChangeEvent evt) -> { diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/DataSourceProfiler.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/DataSourceUsageAnalyzer.java similarity index 92% rename from RecentActivity/src/org/sleuthkit/autopsy/recentactivity/DataSourceProfiler.java rename to RecentActivity/src/org/sleuthkit/autopsy/recentactivity/DataSourceUsageAnalyzer.java index 89a21f6729..77809f0402 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/DataSourceProfiler.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/DataSourceUsageAnalyzer.java @@ -32,8 +32,8 @@ import org.sleuthkit.datamodel.BlackboardAttribute; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.TskCoreException; -@Messages({"DataSourceProfiler.parentModuleName=Recent Activity"}) -public class DataSourceProfiler extends Extract { +@Messages({"DataSourceUsageAnalyzer.parentModuleName=Recent Activity"}) +public class DataSourceUsageAnalyzer extends Extract { private static final Logger logger = Logger.getLogger(Firefox.class.getName()); private Content dataSource; @@ -62,10 +62,10 @@ public class DataSourceProfiler extends Extract { List files = fileManager.findFilesByParentPath(dataSource.getId(), "/windows/system32"); //create an artifact if any files with the windows/system32 path were found if (!files.isEmpty()) { - bbattributes.add(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATA_SOURCE_DESCRIPTOR, + bbattributes.add(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATA_SOURCE_USE_DETAILS, Bundle.DataSourceProfiler_parentModuleName(), "Windows volume")); //NON-NLS - addArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_DATA_SOURCE_PROFILE, dataSource, bbattributes); + addArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_DATA_SOURCE_USAGE, dataSource, bbattributes); } } diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/RAImageIngestModule.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/RAImageIngestModule.java index f3c3ecf503..7d17030809 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/RAImageIngestModule.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/RAImageIngestModule.java @@ -45,7 +45,7 @@ import org.sleuthkit.autopsy.ingest.IngestJobContext; public final class RAImageIngestModule implements DataSourceIngestModule { private static final Logger logger = Logger.getLogger(RAImageIngestModule.class.getName()); - private final List extracters = new ArrayList<>(); + private final List extractors = new ArrayList<>(); private final List browserExtracters = new ArrayList<>(); private IngestServices services = IngestServices.getInstance(); private IngestJobContext context; @@ -70,21 +70,21 @@ public final class RAImageIngestModule implements DataSourceIngestModule { Extract chrome = new Chrome(); Extract firefox = new Firefox(); Extract SEUQA = new SearchEngineURLQueryAnalyzer(); - Extract dataSourceProfiler = new DataSourceProfiler(); + Extract dataSourceProfiler = new DataSourceUsageAnalyzer(); - extracters.add(chrome); - extracters.add(firefox); - extracters.add(iexplore); - extracters.add(recentDocuments); - extracters.add(dataSourceProfiler); - extracters.add(SEUQA); // this needs to run after the web browser modules - extracters.add(registry); // this runs last because it is slowest + extractors.add(chrome); + extractors.add(firefox); + extractors.add(iexplore); + extractors.add(recentDocuments); + extractors.add(dataSourceProfiler); + extractors.add(SEUQA); // this needs to run after the web browser modules + extractors.add(registry); // this runs last because it is slowest browserExtracters.add(chrome); browserExtracters.add(firefox); browserExtracters.add(iexplore); - for (Extract extracter : extracters) { + for (Extract extracter : extractors) { extracter.init(); } } @@ -96,12 +96,12 @@ public final class RAImageIngestModule implements DataSourceIngestModule { "RAImageIngestModule.process.started", dataSource.getName()))); - progressBar.switchToDeterminate(extracters.size()); + progressBar.switchToDeterminate(extractors.size()); ArrayList errors = new ArrayList<>(); - for (int i = 0; i < extracters.size(); i++) { - Extract extracter = extracters.get(i); + for (int i = 0; i < extractors.size(); i++) { + Extract extracter = extractors.get(i); if (context.dataSourceIngestIsCancelled()) { logger.log(Level.INFO, "Recent Activity has been canceled, quitting before {0}", extracter.getName()); //NON-NLS break; @@ -174,8 +174,8 @@ public final class RAImageIngestModule implements DataSourceIngestModule { return ProcessResult.OK; } - for (int i = 0; i < extracters.size(); i++) { - Extract extracter = extracters.get(i); + for (int i = 0; i < extractors.size(); i++) { + Extract extracter = extractors.get(i); try { extracter.complete(); } catch (Exception ex) {