Update extract_otp_secret_keys-linux.py

Quoting KeyURI string to prevent breakage by special chars like brackets
This commit is contained in:
tomatis
2021-12-04 00:17:47 +01:00
committed by GitHub
parent 99c6c972fb
commit 1c4d9e8a64
+1 -1
View File
@@ -101,7 +101,7 @@ for line in (line.strip() for line in fileinput.input(args.infile)):
#Create html file with seed info in QR format
keyURI="otpauth://totp/"+otp.name+"?secret="+secret#+"?issuer="+otp.issuer
#Generate QR code image
system ("qrencode "+ keyURI + " -o img/"+str(line_count+j)+".png")
system ("qrencode '"+ keyURI + "' -o img/"+str(line_count+j)+".png")
encoded = base64.b64encode(open("img/"+str(line_count+j)+".png", "rb").read())
encoded2=encoded.decode('utf-8')
remove("img/"+str(line_count+j)+".png")