mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
Added logic for comparing previous instances.
This commit is contained in:
parent
bd6fcd0eef
commit
b9255ff9c6
@ -23,6 +23,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.stream.Collectors;
|
||||
import org.openide.util.Exceptions;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
@ -120,14 +121,36 @@ final class IngestModule implements FileIngestModule {
|
||||
* Search the central repo to see if this file was previously marked as
|
||||
* being bad. Create artifact if it was.
|
||||
*/
|
||||
if (abstractFile.getKnown() != TskData.FileKnown.KNOWN && flagTaggedNotableItems) {
|
||||
|
||||
if (abstractFile.getKnown() != TskData.FileKnown.KNOWN) {
|
||||
CorrelationAttribute contentCorrelationAttribute = EamArtifactUtil.getCorrelationAttributeFromContent(abstractFile, TskData.FileKnown.BAD, null);
|
||||
try {
|
||||
List<String> caseDisplayNames = dbManager.getListCasesHavingArtifactInstancesKnownBad(filesType, md5);
|
||||
if (!caseDisplayNames.isEmpty()) {
|
||||
postCorrelatedBadFileToBlackboard(abstractFile, caseDisplayNames);
|
||||
List<String> caseDisplayNamesList = EamDb.getInstance().getListCasesHavingArtifactInstancesKnownBad(
|
||||
contentCorrelationAttribute.getCorrelationType(), contentCorrelationAttribute.getCorrelationValue());
|
||||
String currentCaseDisplayName = Case.getCurrentCase().getDisplayName();
|
||||
boolean taggedOutsideCurrentCase = false;
|
||||
if (!caseDisplayNamesList.isEmpty()) {
|
||||
for (String name : caseDisplayNamesList) {
|
||||
if (!name.equals(currentCaseDisplayName)) {
|
||||
taggedOutsideCurrentCase = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(flagTaggedNotableItems || !taggedOutsideCurrentCase) {
|
||||
try {
|
||||
caseDisplayNamesList = dbManager.getListCasesHavingArtifactInstancesKnownBad(filesType, md5);
|
||||
if (!caseDisplayNamesList.isEmpty()) {
|
||||
postCorrelatedBadFileToBlackboard(abstractFile, caseDisplayNamesList);
|
||||
}
|
||||
} catch (EamDbException ex) {
|
||||
logger.log(Level.SEVERE, "Error searching database for artifact.", ex); // NON-NLS
|
||||
return ProcessResult.ERROR;
|
||||
}
|
||||
}
|
||||
} catch (EamDbException ex) {
|
||||
logger.log(Level.SEVERE, "Error searching database for artifact.", ex); // NON-NLS
|
||||
logger.log(Level.SEVERE, "Error searching database for content.", ex); // NON-NLS
|
||||
return ProcessResult.ERROR;
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
</Group>
|
||||
<Component id="ingestSettingsLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="75" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="65" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
|
@ -76,7 +76,7 @@ final class IngestSettingsPanel extends IngestModuleIngestJobSettingsPanel {
|
||||
.addGap(10, 10, 10)
|
||||
.addComponent(flagTaggedNotableItemsCheckbox))
|
||||
.addComponent(ingestSettingsLabel))
|
||||
.addContainerGap(75, Short.MAX_VALUE))
|
||||
.addContainerGap(65, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
|
Loading…
x
Reference in New Issue
Block a user