数字取证中的GPS数据提取与时间概念解析
1. GPS数据提取相关代码与功能
在数字取证领域,提取照片中的GPS数据是一项重要任务。以下是相关的代码实现及功能介绍。
1.1 坐标转换函数
s0 = gpsCoordinate[2][0]
s1 = gpsCoordinate[2][1]
try:
seconds = float(s0) / float(s1)
except:
seconds = 0.0
floatCoordinate = float(degrees + (minutes / 60.0) + (seconds / 3600.0))
return floatCoordinate
此函数用于将GPS坐标转换为度数。它首先尝试计算秒数,如果计算过程中出现异常则将秒数设为0.0,最后将度、分、秒转换为浮点数表示的坐标。
1.2 日志记录类
import logging
class _ForensicLog:
def __init__(self, logName):
try:
# Turn on Logging
logging.basicConfig(filename=logName, level=logging.DEBUG, format='%(asctime)s %(message)s')
except:
print("Forensic
超级会员免费看
订阅专栏 解锁全文
8

被折叠的 条评论
为什么被折叠?



