sleuthkit/autopsy — pull request #156 by pcbje (2013-03-03 11:38:52+00:00)
Title: JPEG selection based on file header

Using the file extension to detect jpeg images for exif extraction is not sufficient. An example where this fails is jpegs in iOS backups where all filenames are hashed with sha-1.

Apache Tika is able to detect jpeg files based on the 4 first bytes. Though you have to create two input streams for each jpeg, it ought to be worth it.