From f6e6fcc40ca4afbf4ca840d024d3c89de55463e6 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 16 Dec 2024 11:16:20 +0100 Subject: [PATCH] make account names unique Some devices (e.g. Reiner SCT) dont get along with non-unique account names. e.g. if one uses TWO microsoft accounts where the issuer is "Microsoft" both times, Reiner SCT only imports one account --- extract_otp_secret_keys.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extract_otp_secret_keys.py b/extract_otp_secret_keys.py index 66b0e91..61468f5 100644 --- a/extract_otp_secret_keys.py +++ b/extract_otp_secret_keys.py @@ -153,7 +153,7 @@ for line in (line.strip() for line in otpauth_list): if args.htmlfile: with open(args.htmlfile, 'a') as f2: # Create html file with seed info in QR format - keyURI = "otpauth://totp/"+otp.name+"?secret="+secret # +"?issuer="+otp.issuer + keyURI = "otpauth://totp/"+str(line_count+j)+(otp.issuer if otp.issuer else otp.name)+"?secret="+secret # +"?issuer="+otp.issuer # Generate QR code image from qrcode import QRCode import qrcode.image.svg