mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-08 14:19:32 +00:00
Exif reporting no longer prints "null" for blanks.
This commit is contained in:
parent
c6ce06928c
commit
3dba9afcc5
@ -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);
|
||||
|
@ -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("<tr").append(altRow).append("><td>").append("Error");
|
||||
}
|
||||
artifact.append("<td>").append(attributes.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID())).append("</td>");
|
||||
artifact.append("<td>").append(attributes.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DEVICE_MAKE.getTypeID())).append("</td>");
|
||||
artifact.append("<td>").append(attributes.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DEVICE_MODEL.getTypeID())).append("</td>");
|
||||
artifact.append("<td>").append(attributes.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE.getTypeID())).append("</td>");
|
||||
artifact.append("<td>").append(attributes.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE.getTypeID())).append("</td>");
|
||||
artifact.append("<td>").append(attributes.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_ALTITUDE.getTypeID())).append("</td>");
|
||||
|
||||
|
||||
Collection<String> bbats = new ArrayList<String>();
|
||||
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("<td>").append(modified).append("</td>");
|
||||
|
||||
}
|
||||
artifact.append("</tr>");
|
||||
nodeExif.append(artifact);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user