Spoof the time on images

main
Bob Mottram 2021-05-09 15:05:52 +01:00
parent d8b882c10f
commit e87353f378
1 changed files with 6 additions and 0 deletions

View File

@ -69,6 +69,12 @@ def _spoofMetaData(imageFilename: str, outputFilename: str,
print('Spoofing metadata in ' + outputFilename + ' using exiftool') print('Spoofing metadata in ' + outputFilename + ' using exiftool')
os.system('exiftool -TagsFromFile ' + os.system('exiftool -TagsFromFile ' +
spoofFilename + ' ' + outputFilename) # nosec spoofFilename + ' ' + outputFilename) # nosec
currTimeAdjusted = \
datetime.datetime.utcnow() - \
datetime.timedelta(minutes=randint(2, 120))
published = currTimeAdjusted.strftime("%Y:%m:%d %H:%M:%S+00:00")
os.system('exiftool -time:all="' + published +
'" ' + outputFilename) # nosec
else: else:
print('ERROR: exiftool is not installed') print('ERROR: exiftool is not installed')
return return