diff --git a/ExifParser/src/org/sleuthkit/autopsy/exifparser/ExifParserFileIngestModule.java b/ExifParser/src/org/sleuthkit/autopsy/exifparser/ExifParserFileIngestModule.java index 359bd24da9..d787a7211b 100644 --- a/ExifParser/src/org/sleuthkit/autopsy/exifparser/ExifParserFileIngestModule.java +++ b/ExifParser/src/org/sleuthkit/autopsy/exifparser/ExifParserFileIngestModule.java @@ -117,13 +117,17 @@ public final class ExifParserFileIngestModule implements IngestModuleAbstractFil // GPS Stuff GpsDirectory gpsDir = metadata.getDirectory(GpsDirectory.class); + String latitude, latRef, longitude, longRef, altitude; + latitude = latRef = longitude = longRef = altitude = ""; + if(gpsDir != null) { - String latitude = gpsDir.getString(GpsDirectory.TAG_GPS_LATITUDE); - String latRef = gpsDir.getString(GpsDirectory.TAG_GPS_LATITUDE_REF); - String longitude = gpsDir.getString(GpsDirectory.TAG_GPS_LONGITUDE); - String longRef = gpsDir.getString(GpsDirectory.TAG_GPS_LONGITUDE_REF); - String altitude = gpsDir.getString(GpsDirectory.TAG_GPS_ALTITUDE); - + latitude = gpsDir.getString(GpsDirectory.TAG_GPS_LATITUDE); + latRef = gpsDir.getString(GpsDirectory.TAG_GPS_LATITUDE_REF); + longitude = gpsDir.getString(GpsDirectory.TAG_GPS_LONGITUDE); + longRef = gpsDir.getString(GpsDirectory.TAG_GPS_LONGITUDE_REF); + altitude = gpsDir.getString(GpsDirectory.TAG_GPS_ALTITUDE); + } + if(latitude!= null && latRef!=null) { attributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_GEO_LATITUDE.getTypeID(), MODULE_NAME, latitude + " " + latRef)); } if(longitude!=null && longRef!=null) { @@ -131,7 +135,8 @@ public final class ExifParserFileIngestModule implements IngestModuleAbstractFil } if(altitude!=null) { attributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_GEO_ALTITUDE.getTypeID(), MODULE_NAME, altitude)); } - } + + // Device info ExifIFD0Directory devDir = metadata.getDirectory(ExifIFD0Directory.class); diff --git a/Report/src/org/sleuthkit/autopsy/report/ReportHTML.java b/Report/src/org/sleuthkit/autopsy/report/ReportHTML.java index e5dc757a56..e963441436 100644 --- a/Report/src/org/sleuthkit/autopsy/report/ReportHTML.java +++ b/Report/src/org/sleuthkit/autopsy/report/ReportHTML.java @@ -39,6 +39,7 @@ import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.datamodel.*; import java.io.File; +import java.util.Collection; import java.util.List; /** @@ -425,12 +426,24 @@ public class ReportHTML implements ReportModule { logger.log(Level.WARNING, "Could not get file name attrached to EXIF artifact!", e); artifact.append("").append("Error"); } - artifact.append("").append(attributes.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID())).append(""); - artifact.append("").append(attributes.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DEVICE_MAKE.getTypeID())).append(""); - artifact.append("").append(attributes.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DEVICE_MODEL.getTypeID())).append(""); - artifact.append("").append(attributes.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE.getTypeID())).append(""); - artifact.append("").append(attributes.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE.getTypeID())).append(""); - artifact.append("").append(attributes.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_ALTITUDE.getTypeID())).append(""); + + + Collection bbats = new ArrayList(); + bbats.add(attributes.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID())); + bbats.add(attributes.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DEVICE_MAKE.getTypeID())); + bbats.add(attributes.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DEVICE_MODEL.getTypeID())); + bbats.add(attributes.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE.getTypeID())); + bbats.add(attributes.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE.getTypeID())); + bbats.add(attributes.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_ALTITUDE.getTypeID())); + + for(String s : bbats){ + String modified = ""; + if(s != null && !s.equals("null")){ + modified = s; + } + artifact.append("").append(modified).append(""); + + } artifact.append(""); nodeExif.append(artifact); }