From 9df37b0890c6b73a57c2be3f32736eb0a45d210e Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Tue, 30 Jul 2024 18:32:14 -0400 Subject: [PATCH] Announce TOTP code has been copied only after the entry has already been decrypted --- src/backend/copy.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/backend/copy.go b/src/backend/copy.go index f64d2d0..b099ca6 100644 --- a/src/backend/copy.go +++ b/src/backend/copy.go @@ -3,11 +3,12 @@ package backend import ( "bufio" "fmt" - steamtotp "github.com/fortis/go-steam-totp" - "github.com/pquerna/otp/totp" "os" "strings" "time" + + steamtotp "github.com/fortis/go-steam-totp" + "github.com/pquerna/otp/totp" ) // CopyArgument copies a field from an entry to the clipboard @@ -39,6 +40,8 @@ func CopyArgument(executableName, targetLocation string, field int) { secret = decryptedEntry[2] } + fmt.Println("TOTP code has been copied to the clipboard - your clipboard will be kept up to date with the current code until this process is closed") + for { // keep field copied to clipboard, refresh on 30-second intervals currentTime := time.Now() copyField("", GenTOTP(secret, currentTime, forSteam))