[sleuthkit-developers] How to query file mimetype in Autopsy 3.1-beta
Brought to you by:
carrier
From: Luís F. N. <lfc...@gm...> - 2014-07-16 03:11:19
|
After running File Type Id. and File Ext Mismatch modules, I see the generated artifacts and attributes into sqlite. But I am not being able to get the mimetype from a file with the code below: Collection<? extends BlackboardArtifact> artifacts = node.getLookup().lookupAll(BlackboardArtifact.class); for(BlackboardArtifact artifact : artifacts) if(artifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_GEN_INFO.getTypeID()) try { for(BlackboardAttribute attr : artifact.getAttributes()){ if(attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_FILE_TYPE_SIG.getTypeID()){ String mimeType = attr.getValueString(); //System.out.println(artifact.getArtifactTypeName() + "-" +attr.getAttributeTypeName() + ": " + mimeType); return mimeType; } } } catch (TskCoreException ex) { Exceptions.printStackTrace(ex); } Is there something wrong with the code? Regards, Luis |