From a135973c9972e92dbd5cb17cf62e941d2abf10f7 Mon Sep 17 00:00:00 2001 From: Kelly Kelly Date: Fri, 6 Dec 2019 11:18:15 -0500 Subject: [PATCH] Initial commit of changes --- .../Bundle.properties-MERGED | 5 +- .../ingestmodule/CentralRepoIngestModule.java | 92 ++++++++++++------- 2 files changed, 61 insertions(+), 36 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/centralrepository/Bundle.properties-MERGED index 75866a79d0..007af703c5 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/Bundle.properties-MERGED @@ -5,7 +5,10 @@ CentralRepoCommentDialog.title.addEditCentralRepoComment=Add/Edit Central Reposi OpenIDE-Module-Name=Central Repository OpenIDE-Module-Display-Category=Ingest Module OpenIDE-Module-Short-Description=Correlation Engine Ingest Module -OpenIDE-Module-Long-Description=Correlation Engine ingest module and central database. \n\nThe Correlation Engine ingest module stores attributes of artifacts matching selected correlation types into a central database.\nStored attributes are used in future cases to correlate and analyzes files and artifacts during ingest. +OpenIDE-Module-Long-Description=\ + Correlation Engine ingest module and central database. \n\n\ + The Correlation Engine ingest module stores attributes of artifacts matching selected correlation types into a central database.\n\ + Stored attributes are used in future cases to correlate and analyzes files and artifacts during ingest. CentralRepoCommentDialog.commentLabel.text=Comment: CentralRepoCommentDialog.okButton.text=&OK CentralRepoCommentDialog.cancelButton.text=C&ancel diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/CentralRepoIngestModule.java b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/CentralRepoIngestModule.java index 792a3f2ebb..54f667e808 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/CentralRepoIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/CentralRepoIngestModule.java @@ -355,7 +355,7 @@ final class CentralRepoIngestModule implements FileIngestModule { logger.log(Level.SEVERE, "Unable to index blackboard artifact " + tifArtifact.getArtifactID(), ex); //NON-NLS } // send inbox message - sendBadFileInboxMessage(tifArtifact, abstractFile.getName(), abstractFile.getMd5Hash()); + sendBadFileInboxMessage(tifArtifact, abstractFile.getName(), abstractFile.getMd5Hash(), caseDisplayNames); } } catch (TskCoreException ex) { logger.log(Level.SEVERE, "Failed to create BlackboardArtifact.", ex); // NON-NLS @@ -363,6 +363,28 @@ final class CentralRepoIngestModule implements FileIngestModule { logger.log(Level.SEVERE, "Failed to create BlackboardAttribute.", ex); // NON-NLS } } + + @Messages({ + "CentralRepoIngestModule_notable_message_header=A file in this data source was previously seen and tagged as Notable.
", + "CentralRepoIngestModel_name_header=Name:
", + "CentralRepoIngestModel_previous_case_header=
Previous Cases:
" + + }) + private void sendBadFileInboxMessage(BlackboardArtifact artifact, String name, String md5Hash, List caseDisplayNames) { + StringBuilder detailsSb = new StringBuilder(); + + detailsSb.append(Bundle.CentralRepoIngestModule_notable_message_header()).append(Bundle.CentralRepoIngestModel_name_header()); + detailsSb.append(name).append(Bundle.CentralRepoIngestModel_previous_case_header()); + for(String str: caseDisplayNames) { + detailsSb.append(str).append("
"); + } + detailsSb.append(""); + services.postMessage(IngestMessage.createDataMessage(CentralRepoIngestModuleFactory.getModuleName(), + Bundle.CentralRepoIngestModule_postToBB_knownBadMsg(name), + detailsSb.toString(), + name + md5Hash, + artifact)); + } /** * Post a message to the ingest inbox alerting the user that a bad file was @@ -379,39 +401,39 @@ final class CentralRepoIngestModule implements FileIngestModule { "# {0} - Name of file that is Notable", "CentralRepoIngestModule.postToBB.knownBadMsg=Notable: {0}"}) public void sendBadFileInboxMessage(BlackboardArtifact artifact, String name, String md5Hash) { - StringBuilder detailsSb = new StringBuilder(); - //details - detailsSb.append(""); //NON-NLS - //hit - detailsSb.append(""); //NON-NLS - detailsSb.append(""); //NON-NLS - detailsSb.append(""); //NON-NLS - detailsSb.append(""); //NON-NLS - - detailsSb.append(""); //NON-NLS - detailsSb.append(""); //NON-NLS - detailsSb.append(""); //NON-NLS - detailsSb.append(""); //NON-NLS - - detailsSb.append(""); //NON-NLS - detailsSb.append(""); //NON-NLS - detailsSb.append(""); //NON-NLS - detailsSb.append(""); //NON-NLS - - detailsSb.append("
") //NON-NLS - .append(Bundle.CentralRepoIngestModule_postToBB_fileName()) - .append("") //NON-NLS - .append(name) - .append("
") //NON-NLS - .append(Bundle.CentralRepoIngestModule_postToBB_md5Hash()) - .append("").append(md5Hash).append("
") //NON-NLS - .append(Bundle.CentralRepoIngestModule_postToBB_hashSetSource()) - .append("").append(Bundle.CentralRepoIngestModule_postToBB_eamHit()).append("
"); //NON-NLS - - services.postMessage(IngestMessage.createDataMessage(CentralRepoIngestModuleFactory.getModuleName(), - Bundle.CentralRepoIngestModule_postToBB_knownBadMsg(name), - detailsSb.toString(), - name + md5Hash, - artifact)); +// StringBuilder detailsSb = new StringBuilder(); +// //details +// detailsSb.append(""); //NON-NLS +// //hit +// detailsSb.append(""); //NON-NLS +// detailsSb.append(""); //NON-NLS +// detailsSb.append(""); //NON-NLS +// detailsSb.append(""); //NON-NLS +// +// detailsSb.append(""); //NON-NLS +// detailsSb.append(""); //NON-NLS +// detailsSb.append(""); //NON-NLS +// detailsSb.append(""); //NON-NLS +// +// detailsSb.append(""); //NON-NLS +// detailsSb.append(""); //NON-NLS +// detailsSb.append(""); //NON-NLS +// detailsSb.append(""); //NON-NLS +// +// detailsSb.append("
") //NON-NLS +// .append(Bundle.CentralRepoIngestModule_postToBB_fileName()) +// .append("") //NON-NLS +// .append(name) +// .append("
") //NON-NLS +// .append(Bundle.CentralRepoIngestModule_postToBB_md5Hash()) +// .append("").append(md5Hash).append("
") //NON-NLS +// .append(Bundle.CentralRepoIngestModule_postToBB_hashSetSource()) +// .append("").append(Bundle.CentralRepoIngestModule_postToBB_eamHit()).append("
"); //NON-NLS +// +// services.postMessage(IngestMessage.createDataMessage(CentralRepoIngestModuleFactory.getModuleName(), +// Bundle.CentralRepoIngestModule_postToBB_knownBadMsg(name), +// detailsSb.toString(), +// name + md5Hash, +// artifact)); } }