From 1c4d9e8a64938b5c0838904ef920cc7bd3df00aa Mon Sep 17 00:00:00 2001 From: tomatis Date: Sat, 4 Dec 2021 00:17:47 +0100 Subject: [PATCH] Update extract_otp_secret_keys-linux.py Quoting KeyURI string to prevent breakage by special chars like brackets --- extract_otp_secret_keys-linux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extract_otp_secret_keys-linux.py b/extract_otp_secret_keys-linux.py index 28ec715..8723fcc 100644 --- a/extract_otp_secret_keys-linux.py +++ b/extract_otp_secret_keys-linux.py @@ -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")