mirror of https://gitlab.com/bashrc2/epicyon
Spoof the time on images
parent
d8b882c10f
commit
e87353f378
6
media.py
6
media.py
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue