- 4th Jul 2024
- 18:30 pm
For this assignment, you will be writing a script in Python which parses selected EXIF fields from JPG files. The script will be submitted to Gradescope, where it will be autograded. It is extremely important you follow the criteria exactly.
Requirements:
- Your script must be named ‘exifParse.py’ (case sensitive)
- It must take exactly one argument, which will be a JPG file
- Your script must properly handle no argument being provided
- It must also handle an argument where the file doesn’t actually exist or is unable to be opened (hint: IOError)
- Your script must display the following criteria to stdout:
- The name of the provided source file (JPG argument)
- The make of the device which took the photo
- The model of the device which took the photo
- The date & time the photo was taken
- The Latitude of the photo location
- The Longitude of the photo location
You script will be graded using Python3, and the following EXIF related libraries will be available to be used:
- exifread
- exif
- piexif
Digital Forensics - CS-6963 - EXIF Parser - Get Assignment Solution
Please note that this is a sample solution created by our Python programmers for the Digital Forensics - CS-6963 - EXIF Parser assignment. These solutions are for research and reference only.
- Visit our Python Assignment Sample Solution page to download the complete solution, including code, report, and screenshots.
- Connect with our Python Tutors for online tutoring to help you understand and complete this assignment.
- Check out the partial solution for this assignment in the blog post below.
Free Assignment Solution - Digital Forensics - CS-6963 - EXIF Parser
from exif import Image
import sys
if len(sys.argv) > 1:
try:
fileName = sys.argv[1]
with open(fileName,'rb') as file:
img = Image(file)
print("Source File: " + fileName)
print("Make: " + img.get("make"))
print("Model: " + img.get("model"))
print("Orignal Date/Time: " + img.get("datetime_original"))
print("Latitude: " + str(img.get("gps_latitude")[0]) + " degrees, " + str(img.get("gps_latitude")[1]) + " minutes, " + str(img.get("gps_latitude")[2]) + " seconds")
print("Longitude: " + str(img.get("gps_longitude")[0]) + " degrees, " + str(img.get("gps_longitude")[1]) + " minutes, " + str(img.get("gps_longitude")[2]) + " seconds")
except Exception as ex:
print("Error! - File Not Found!")
print(ex)
else:
print("Error! - No Image File Specified")
Get the best Developing a Digital Forensics - CS-6963 - EXIF Parser assignment and tutoring services from our experts now!
About The Author - Emma White
Emma White is a skilled Python programmer specializing in digital forensics and data analysis. With a focus on cybersecurity, Emma excels in developing scripts for parsing EXIF data from JPG files. Her solutions are designed to meet stringent grading criteria, ensuring accuracy and reliability in extracting device information, timestamps, and geographic coordinates from digital photos.