Mismatch module now uses new public artifact TSK_MISMATCH_DETECTED.

This commit is contained in:
Samuel H. Kenyon 2013-12-17 15:27:26 -05:00
parent 82a05228d2
commit 5ae5fb97db

View File

@ -75,7 +75,6 @@ public class FileExtMismatchIngestModule extends org.sleuthkit.autopsy.ingest.In
private static long numFiles = 0;
private static boolean skipKnown = false;
private int artId = -1;
private int attrId = -1;
private FileExtMismatchSimpleConfigPanel simpleConfigPanel;
private IngestServices services;
@ -110,7 +109,6 @@ public class FileExtMismatchIngestModule extends org.sleuthkit.autopsy.ingest.In
} catch (TskCoreException ex) {
// create it if not
try {
artId = sleuthkitCase.addArtifactType(ART_NAME, "A filename extension mismatch detection hit.");
attrId = sleuthkitCase.addAttrType(ATTR_NAME, "Flag for detected mismatch between filename extension and file signature.");
} catch (TskCoreException ex1) {
logger.log(Level.SEVERE, "Error adding artifact and attribute types: " + ex1.getLocalizedMessage());
@ -149,11 +147,11 @@ public class FileExtMismatchIngestModule extends org.sleuthkit.autopsy.ingest.In
if (flag) {
// add artifact
BlackboardArtifact bart = abstractFile.newArtifact(artId);
BlackboardArtifact bart = abstractFile.newArtifact(ARTIFACT_TYPE.TSK_MISMATCH_DETECTED);
BlackboardAttribute batt = new BlackboardAttribute(attrId, MODULE_NAME, "", ATTR_VALUE_WRONG);
bart.addAttribute(batt);
services.fireModuleDataEvent(new ModuleDataEvent(MODULE_NAME, ARTIFACT_TYPE.fromID(artId), Collections.singletonList(bart)));
services.fireModuleDataEvent(new ModuleDataEvent(MODULE_NAME, ARTIFACT_TYPE.TSK_MISMATCH_DETECTED, Collections.singletonList(bart)));
}
return ProcessResult.OK;
} catch (TskException ex) {