mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 02:07:42 +00:00
Merge pull request #1820 from BasisOlivers/custom_artifact_addition-1857
Custom artifact addition fixed DirectoryTreeTopComponent.viewArtifact
This commit is contained in:
commit
f591eab75a
@ -845,13 +845,14 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
|
||||
@Override
|
||||
public void viewArtifact(final BlackboardArtifact art) {
|
||||
BlackboardArtifact.ARTIFACT_TYPE type = BlackboardArtifact.ARTIFACT_TYPE.fromID(art.getArtifactTypeID());
|
||||
int typeID = art.getArtifactTypeID();
|
||||
String typeName = art.getArtifactTypeName();
|
||||
Children rootChilds = em.getRootContext().getChildren();
|
||||
Node treeNode = null;
|
||||
Node resultsNode = rootChilds.findChild(ResultsNode.NAME);
|
||||
Children resultsChilds = resultsNode.getChildren();
|
||||
if (type.equals(BlackboardArtifact.ARTIFACT_TYPE.TSK_HASHSET_HIT)) {
|
||||
Node hashsetRootNode = resultsChilds.findChild(type.getLabel());
|
||||
if (typeID == BlackboardArtifact.ARTIFACT_TYPE.TSK_HASHSET_HIT.getTypeID()) {
|
||||
Node hashsetRootNode = resultsChilds.findChild(typeName);
|
||||
Children hashsetRootChilds = hashsetRootNode.getChildren();
|
||||
try {
|
||||
String setName = null;
|
||||
@ -866,8 +867,8 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "Error retrieving attributes", ex); //NON-NLS
|
||||
}
|
||||
} else if (type.equals(BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT)) {
|
||||
Node keywordRootNode = resultsChilds.findChild(type.getLabel());
|
||||
} else if (typeID == BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID()) {
|
||||
Node keywordRootNode = resultsChilds.findChild(typeName);
|
||||
Children keywordRootChilds = keywordRootNode.getChildren();
|
||||
try {
|
||||
String listName = null;
|
||||
@ -893,9 +894,9 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "Error retrieving attributes", ex); //NON-NLS
|
||||
}
|
||||
} else if (type.equals(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT)
|
||||
|| type.equals(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT)) {
|
||||
Node interestingItemsRootNode = resultsChilds.findChild(type.getLabel());
|
||||
} else if (typeID == BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT.getTypeID()
|
||||
|| typeID == BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT.getTypeID()) {
|
||||
Node interestingItemsRootNode = resultsChilds.findChild(typeName);
|
||||
Children interestingItemsRootChildren = interestingItemsRootNode.getChildren();
|
||||
try {
|
||||
String setName = null;
|
||||
@ -916,7 +917,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
if (extractedChilds == null) {
|
||||
return;
|
||||
}
|
||||
treeNode = extractedChilds.findChild(type.getLabel());
|
||||
treeNode = extractedChilds.findChild(typeName);
|
||||
}
|
||||
|
||||
if (treeNode == null) {
|
||||
|
@ -7,11 +7,16 @@ package org.sleuthkit.autopsy.modules.UserArtifacts;
|
||||
|
||||
import com.sun.media.jfxmedia.logging.Logger;
|
||||
import java.util.List;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.services.FileManager;
|
||||
import org.sleuthkit.autopsy.ingest.DataSourceIngestModule;
|
||||
import org.sleuthkit.autopsy.ingest.DataSourceIngestModuleProgress;
|
||||
import org.sleuthkit.autopsy.ingest.IngestJobContext;
|
||||
import org.sleuthkit.autopsy.ingest.IngestMessage;
|
||||
import org.sleuthkit.autopsy.ingest.IngestServices;
|
||||
import org.sleuthkit.autopsy.modules.hashdatabase.HashDbIngestModule;
|
||||
import org.sleuthkit.autopsy.modules.hashdatabase.HashLookupModuleFactory;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
@ -55,6 +60,12 @@ public class UserArtifactIngestModule implements DataSourceIngestModule {
|
||||
art2.addAttribute(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_MIN_COUNT,
|
||||
UserArtifactIngestModuleFactory.getModuleName(), 4));
|
||||
progressBar.progress(1);
|
||||
IngestServices.getInstance().postMessage(IngestMessage.createDataMessage(
|
||||
"name",
|
||||
UserArtifactIngestModuleFactory.getModuleName(),
|
||||
"Test Results",
|
||||
"Test",
|
||||
art1));
|
||||
return ProcessResult.OK;
|
||||
} catch (TskCoreException ex) {
|
||||
return ProcessResult.ERROR;
|
||||
|
Loading…
x
Reference in New Issue
Block a user