mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 19:14:55 +00:00
Print statements to debug lack of hashdb hits during regression tests.
This commit is contained in:
parent
062813cb9e
commit
9c0036c623
@ -53,7 +53,9 @@ public final class HashDatabaseOptionsPanelController extends OptionsPanelContro
|
||||
|
||||
@Override
|
||||
public void applyChanges() {
|
||||
System.out.println("in applyChanges, before store");
|
||||
getPanel().store();
|
||||
System.out.println("in applyChanges, after store");
|
||||
changed = false;
|
||||
}
|
||||
|
||||
|
@ -209,6 +209,7 @@ public class HashDbIngestModule extends IngestModuleAbstractFile {
|
||||
private ProcessResult processFile(AbstractFile file) {
|
||||
// bail out if we have no hashes set
|
||||
if ((knownHashSets.isEmpty()) && (knownBadHashSets.isEmpty()) && (calcHashesIsSet == false)) {
|
||||
System.out.println("processFile, no hashes set");
|
||||
return ProcessResult.OK;
|
||||
}
|
||||
|
||||
@ -239,6 +240,7 @@ public class HashDbIngestModule extends IngestModuleAbstractFile {
|
||||
ProcessResult ret = ProcessResult.OK;
|
||||
for (HashDb db : knownBadHashSets) {
|
||||
try {
|
||||
System.out.println("in processFile known bad");
|
||||
long lookupstart = System.currentTimeMillis();
|
||||
HashInfo hashInfo = db.lookUp(file);
|
||||
if (null != hashInfo) {
|
||||
@ -247,6 +249,7 @@ public class HashDbIngestModule extends IngestModuleAbstractFile {
|
||||
try {
|
||||
skCase.setKnown(file, TskData.FileKnown.BAD);
|
||||
} catch (TskException ex) {
|
||||
System.out.println("in processFile couldn't set known bad state 252");
|
||||
logger.log(Level.WARNING, "Couldn't set known bad state for file " + name + " - see sleuthkit log for details", ex);
|
||||
services.postMessage(IngestMessage.createErrorMessage(++messageId,
|
||||
HashDbIngestModule.this,
|
||||
@ -273,11 +276,13 @@ public class HashDbIngestModule extends IngestModuleAbstractFile {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("About to postHashHitToBlackboard");
|
||||
postHashSetHitToBlackboard(file, md5Hash, hashSetName, comment, db.getSendIngestMessages());
|
||||
System.out.println("Out of postHashHitToBlackboard");
|
||||
}
|
||||
lookuptime += (System.currentTimeMillis() - lookupstart);
|
||||
} catch (TskException ex) {
|
||||
System.out.println("in processFile couldn't lookup known bad state 252");
|
||||
logger.log(Level.WARNING, "Couldn't lookup known bad hash for file " + name + " - see sleuthkit log for details", ex);
|
||||
services.postMessage(IngestMessage.createErrorMessage(++messageId,
|
||||
HashDbIngestModule.this,
|
||||
@ -297,12 +302,14 @@ public class HashDbIngestModule extends IngestModuleAbstractFile {
|
||||
if (!foundBad) {
|
||||
for (HashDb db : knownHashSets) {
|
||||
try {
|
||||
System.out.println("in processFile 205");
|
||||
long lookupstart = System.currentTimeMillis();
|
||||
if (db.hasMd5HashOf(file)) {
|
||||
try {
|
||||
skCase.setKnown(file, TskData.FileKnown.KNOWN);
|
||||
break;
|
||||
} catch (TskException ex) {
|
||||
System.out.println("in processFile couldn't set known bad state 311");
|
||||
logger.log(Level.WARNING, "Couldn't set known state for file " + name + " - see sleuthkit log for details", ex);
|
||||
services.postMessage(IngestMessage.createErrorMessage(++messageId,
|
||||
HashDbIngestModule.this,
|
||||
@ -317,6 +324,7 @@ public class HashDbIngestModule extends IngestModuleAbstractFile {
|
||||
}
|
||||
lookuptime += (System.currentTimeMillis() - lookupstart);
|
||||
} catch (TskException ex) {
|
||||
System.out.println("in processFile couldn't lookup known bad state 326");
|
||||
logger.log(Level.WARNING, "Couldn't lookup known hash for file " + name + " - see sleuthkit log for details", ex);
|
||||
services.postMessage(IngestMessage.createErrorMessage(++messageId,
|
||||
HashDbIngestModule.this,
|
||||
@ -335,6 +343,7 @@ public class HashDbIngestModule extends IngestModuleAbstractFile {
|
||||
}
|
||||
|
||||
private void postHashSetHitToBlackboard(AbstractFile abstractFile, String md5Hash, String hashSetName, String comment, boolean showInboxMessage) {
|
||||
System.out.printf("at postHashSetHitToBlackboard");
|
||||
try {
|
||||
BlackboardArtifact badFile = abstractFile.newArtifact(ARTIFACT_TYPE.TSK_HASHSET_HIT);
|
||||
//TODO Revisit usage of deprecated constructor as per TSK-583
|
||||
|
Loading…
x
Reference in New Issue
Block a user