From c2456c33d851e459d91eae79d30474f16e2b9bee Mon Sep 17 00:00:00 2001 From: Brian Carrier Date: Wed, 19 Nov 2014 17:24:34 -0500 Subject: [PATCH] updated to use TSK Data model HashUtil method for no data hash check --- .../hashdatabase/AddContentToHashDbAction.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java index ce63ab8f85..28efc22d75 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java @@ -27,15 +27,16 @@ import javax.swing.AbstractAction; import javax.swing.JMenu; import javax.swing.JMenuItem; import javax.swing.JOptionPane; - import org.openide.util.NbBundle; import org.openide.util.Utilities; import org.openide.util.actions.Presenter; import org.sleuthkit.autopsy.coreutils.Logger; -import org.sleuthkit.datamodel.AbstractFile; -import org.sleuthkit.datamodel.TskCoreException; -import static org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDb; import org.sleuthkit.autopsy.ingest.IngestManager; +import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDb; +import static org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDb; +import org.sleuthkit.datamodel.AbstractFile; +import org.sleuthkit.datamodel.HashUtility; +import org.sleuthkit.datamodel.TskCoreException; /** * Instances of this Action allow users to content to a hash database. @@ -149,7 +150,7 @@ final class AddContentToHashDbAction extends AbstractAction implements Presenter String md5Hash = file.getMd5Hash(); if (null != md5Hash) { // don't let them add the hash for an empty file to the DB - if (md5Hash.toLowerCase().equals("d41d8cd98f00b204e9800998ecf8427e")) { //NON-NLS + if (HashUtility.isNoDataMd5(md5Hash)) { //NON-NLS Logger.getLogger(AddContentToHashDbAction.class.getName()).log(Level.INFO, "Not adding " + file.getName() + " to database (empty content)"); //NON-NLS JOptionPane.showMessageDialog(null, NbBundle.getMessage(this.getClass(),