diff --git a/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/LeappFileProcessor.java b/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/LeappFileProcessor.java index 9f7418f8f9..b73b127284 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/LeappFileProcessor.java +++ b/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/LeappFileProcessor.java @@ -162,7 +162,7 @@ public final class LeappFileProcessor { * Process the Leapp files that were found that match the xml mapping file * * @param LeappFilesToProcess List of files to process - * @param LeappImageFile Abstract file to create artifact for + * @param LeappImageFile Abstract file to create artifact for * * @throws FileNotFoundException * @throws IOException @@ -197,7 +197,7 @@ public final class LeappFileProcessor { * Process the Leapp files that were found that match the xml mapping file * * @param LeappFilesToProcess List of files to process - * @param dataSource The data source. + * @param dataSource The data source. * * @throws FileNotFoundException * @throws IOException @@ -258,20 +258,22 @@ public final class LeappFileProcessor { /** * Process the line read and create the necessary attributes for it * - * @param line a tsv line to process that was read + * @param line a tsv line to process that was read * @param columnNumberToProcess Which columns to process in the tsv line - * @param fileName name of file begin processed + * @param fileName name of file begin processed * * @return */ private Collection processReadLine(String line, Map columnNumberToProcess, String fileName) throws IngestModuleException { - + String[] columnValues; - - // Check to see if the 2 values are equal, they may not be equal if there is no corresponding data in the line. + + // Check to see if the 2 values are equal, they may not be equal if there is no corresponding data in the line + // or if the size of the line to split is not equal to the column numbers we are looking to process. This + // can happen when the last value of the tsv line has no data in it. // If this happens then adding an empty value(s) for each columnValue where data does not exist Integer maxColumnNumber = Collections.max(columnNumberToProcess.keySet()); - if (maxColumnNumber > line.split("\\t").length) { + if ((maxColumnNumber > line.split("\\t").length) || (columnNumberToProcess.size() > line.split("\\t").length)) { columnValues = Arrays.copyOf(line.split("\\t"), maxColumnNumber + 1); } else { columnValues = line.split("\\t"); @@ -283,15 +285,17 @@ public final class LeappFileProcessor { Integer columnNumber = columnToProcess.getKey(); String attributeName = columnToProcess.getValue(); - try { - BlackboardAttribute.Type attributeType = Case.getCurrentCase().getSleuthkitCase().getAttributeType(attributeName.toUpperCase()); - if (attributeType == null) { - break; + if (columnValues[columnNumber] != null) { + try { + BlackboardAttribute.Type attributeType = Case.getCurrentCase().getSleuthkitCase().getAttributeType(attributeName.toUpperCase()); + if (attributeType == null) { + break; + } + String attrType = attributeType.getValueType().getLabel().toUpperCase(); + checkAttributeType(bbattributes, attrType, columnValues, columnNumber, attributeType, fileName); + } catch (TskCoreException ex) { + throw new IngestModuleException(String.format("Error getting Attribute type for Attribute Name %s", attributeName), ex); //NON-NLS } - String attrType = attributeType.getValueType().getLabel().toUpperCase(); - checkAttributeType(bbattributes, attrType, columnValues, columnNumber, attributeType, fileName); - } catch (TskCoreException ex) { - throw new IngestModuleException(String.format("Error getting Attribute type for Attribute Name %s", attributeName), ex); //NON-NLS } } @@ -343,11 +347,11 @@ public final class LeappFileProcessor { * headings to the columns in the XML mapping file so we know which columns * to process. * - * @param line a tsv heading line of the columns in the file + * @param line a tsv heading line of the columns in the file * @param attrList the list of headings we want to process * * @return the numbered column(s) and attribute(s) we want to use for the - * column(s) + * column(s) */ private Map findColumnsToProcess(String line, List> attrList) { String[] columnNames = line.split("\\t"); @@ -466,13 +470,12 @@ public final class LeappFileProcessor { /** * Generic method for creating a blackboard artifact with attributes * - * @param type is a blackboard.artifact_type enum to determine which - * type the artifact should be + * @param type is a blackboard.artifact_type enum to determine which type + * the artifact should be * @param abstractFile is the AbstractFile object that needs to have the - * artifact added for it + * artifact added for it * @param bbattributes is the collection of blackboard attributes that need - * to be added to the artifact after the artifact has - * been created + * to be added to the artifact after the artifact has been created * * @return The newly-created artifact, or null on error */ @@ -490,13 +493,12 @@ public final class LeappFileProcessor { /** * Generic method for creating a blackboard artifact with attributes * - * @param type is a blackboard.artifact_type enum to determine which - * type the artifact should be - * @param dataSource is the Content object that needs to have the artifact - * added for it + * @param type is a blackboard.artifact_type enum to determine which type + * the artifact should be + * @param dataSource is the Content object that needs to have the artifact + * added for it * @param bbattributes is the collection of blackboard attributes that need - * to be added to the artifact after the artifact has - * been created + * to be added to the artifact after the artifact has been created * * @return The newly-created artifact, or null on error */ @@ -515,7 +517,7 @@ public final class LeappFileProcessor { * Method to post a list of BlackboardArtifacts to the blackboard. * * @param artifacts A list of artifacts. IF list is empty or null, the - * function will return. + * function will return. */ void postArtifacts(Collection artifacts) { if (artifacts == null || artifacts.isEmpty()) { diff --git a/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/aleap-artifact-attribute-reference.xml b/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/aleap-artifact-attribute-reference.xml index 6a573e0abb..1ed5bdef1b 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/aleap-artifact-attribute-reference.xml +++ b/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/aleap-artifact-attribute-reference.xml @@ -31,8 +31,8 @@ - - + + @@ -40,9 +40,9 @@ - + - + @@ -56,17 +56,17 @@ - - - - - + + + + + - + @@ -108,11 +108,11 @@ - - - - - + + + + + @@ -153,17 +153,17 @@ - - - - - + + + + + - + @@ -197,11 +197,11 @@ - - - - - + + + + + @@ -224,6 +224,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -233,10 +306,11 @@ - - + + - + + @@ -256,12 +330,12 @@ - + - + - + diff --git a/thirdparty/aLeapp/aleapp.exe b/thirdparty/aLeapp/aleapp.exe index 52fab109ea..179d7b6331 100644 Binary files a/thirdparty/aLeapp/aleapp.exe and b/thirdparty/aLeapp/aleapp.exe differ