Made sample not visible, fixed creation of file type sig attribute

This commit is contained in:
Oliver Spohngellert 2016-01-27 09:19:49 -05:00
parent 14e40c9e1f
commit b76096f5b4
3 changed files with 5 additions and 6 deletions

View File

@ -144,7 +144,7 @@ public final class ExternalResultsImporter {
// Add the artifact's attributes to the case database.
Collection<BlackboardAttribute> attributes = new ArrayList<>();
for (ExternalResults.ArtifactAttribute attributeData : artifactData.getAttributes()) {
BlackboardAttribute.Type attributeType = caseDb.getAttrType(attributeData.getType());
BlackboardAttribute.Type attributeType = caseDb.getAttributeType(attributeData.getType());
if (attributeType == null) {
switch (attributeData.getValueType()) {
case "text": //NON-NLS

View File

@ -143,8 +143,8 @@ final class IngestModuleFactoryLoader {
private static void addFactory(IngestModuleFactory factory, HashSet<String> moduleDisplayNames, HashMap<String, IngestModuleFactory> javaFactoriesByClass) {
// Ignore the sample ingest module factories implemented in Java.
String className = factory.getClass().getCanonicalName();
if (className.equals(IngestModuleFactoryLoader.SAMPLE_MODULE_FACTORY_CLASS_NAME)) {
//|| className.equals(IngestModuleFactoryLoader.SAMPLE_EXECUTABLE_MODULE_FACTORY_CLASS_NAME)) {
if (className.equals(IngestModuleFactoryLoader.SAMPLE_MODULE_FACTORY_CLASS_NAME)
|| className.equals(IngestModuleFactoryLoader.SAMPLE_EXECUTABLE_MODULE_FACTORY_CLASS_NAME)) {
return;
}

View File

@ -152,11 +152,10 @@ public class FileTypeDetector {
* because general info artifacts are different from other
* artifacts, e.g., they are not displayed in the results tree.
*/
BlackboardArtifact getInfoArt = file.getGenInfoArtifact();
BlackboardAttribute batt = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_FILE_TYPE_SIG, FileTypeIdModuleFactory.getModuleName(), mimeType);
getInfoArt.addAttribute(batt);
try {
file.setMIMEType(mimeType);
BlackboardArtifact getInfoArt = file.getGenInfoArtifact();
BlackboardAttribute batt = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_FILE_TYPE_SIG, FileTypeIdModuleFactory.getModuleName(), mimeType);
getInfoArt.addAttribute(batt);
} catch (TskDataException ex) {
//Swallowing exception so that the logs aren't clogged in the case that ingest is run multiple times.