interactive_decode_clipboard

package
v0.81.0-dev-3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:     "interactive-decode-clipboard",
	Short:   "Base64 Interactive Decode from Clipboard",
	Aliases: []string{"idc"},
	Args:    cobra.NoArgs,
	Run: func(c *cobra.Command, args []string) {
		clipboardDataOld := ""
		for {
			clipboardData, err := clipboard.ReadAll()
			if err != nil {
				log.Fatal(err)
			}
			if clipboardData != clipboardDataOld {
				clipboardDataOld = clipboardData
				dataPlainText, err := base64.StdEncoding.DecodeString(clipboardData)
				if err == nil {
					fmt.Println(string(dataPlainText))
					fmt.Println("----------------------------------------------------")
				}
			}
			time.Sleep(1 * time.Second)
		}
	},
}
View Source
var FlagNamespace string

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL