Python 2 compatibility for exifHeader.

This commit is contained in:
Cédric Bonhomme 2016-05-26 07:18:56 +02:00
parent 1def5672ab
commit fef2040fca
No known key found for this signature in database
GPG key ID: A1CB94DE57B7A70D
4 changed files with 26 additions and 12 deletions

View file

@ -181,8 +181,8 @@ if __name__ == '__main__':
elif options.reveal:
secret = reveal(options.input_image_file)
if options.secret_binary != "":
data = tools.base642binary(secret)
with open(options.secret_binary, "w") as f:
data = tools.base642binary(bytes(secret, "utf-8)"))
with open(options.secret_binary, "wb") as f:
f.write(data)
else:
print(secret)