Remove use-copy-paste option from autotype

This commit is contained in:
Bernd Schoolmann 2023-12-06 02:41:50 +01:00
parent 04d2357f3c
commit 5a40f237a7
No known key found for this signature in database
4 changed files with 3 additions and 21 deletions

View File

@ -49,7 +49,7 @@ func ListLogins(client client.Client) ([]messages.DecryptedLoginCipher, error) {
}
}
func Run(layout string, useCopyPaste bool, client client.Client) {
func Run(layout string, client client.Client) {
logins, err := ListLogins(client)
if err != nil {
panic(err)
@ -70,15 +70,7 @@ func Run(layout string, useCopyPaste bool, client client.Client) {
panic(err)
}
if useCopyPaste {
clipboard.WriteAll(string(login.Username))
autotype.Paste(layout)
autotype.TypeString("\t", layout)
clipboard.WriteAll(login.Password)
autotype.Paste(layout)
} else {
autotype.TypeString(string(login.Username)+"\t"+string(login.Password), layout)
}
clipboard.WriteAll(login.TwoFactorCode)
c <- true

View File

@ -68,8 +68,3 @@ func TypeString(textToType string, layout string) {
}
}
}
func Paste(layout string) error {
fmt.Println("Not implemented")
return nil
}

View File

@ -7,7 +7,3 @@ import "github.com/quexten/goldwarden/autofill/autotype/uinput"
func TypeString(text string, layout string) error {
return uinput.TypeString(text, layout)
}
func Paste(layout string) error {
return uinput.Paste(layout)
}

View File

@ -13,8 +13,7 @@ var autofillCmd = &cobra.Command{
Long: `Autofill credentials`,
Run: func(cmd *cobra.Command, args []string) {
layout := cmd.Flag("layout").Value.String()
useCopyPaste, _ := cmd.Flags().GetBool("use-copy-paste")
autofill.Run(layout, useCopyPaste, commandClient)
autofill.Run(layout, commandClient)
},
}