cmddebug

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &command.C{
	Name: "debug",
	Help: `Debug commands (potentially dangerous).

Debug commands require specifying a database path explicitly.
Use "@" to refer to the path set via the --db flag.`,

	Unlisted: true,

	Commands: []*command.C{
		{
			Name:  "export",
			Usage: "<db-path>",
			Help:  "Export the contents of a database in plaintext as JSON.",
			Run:   command.Adapt(runDebugExport),
		},
		{
			Name:  "import",
			Usage: "<db-path> <json-path>",
			Help:  "Import a plaintext JSON into a database, replacing its contents.",
			Run:   command.Adapt(runDebugImport),
		},
		{
			Name:  "hashpass",
			Usage: "[flags] [salt]@seed",
			Help: `Generate an HKDF based hashed password.

The seed is the non-secret generator seed. If provided, the salt is
mixed in to the HKDF as additional context. The user is prompted for
the HKDF secret. The output is written as a single line to stdout.`,
			SetFlags: command.Flags(flax.MustBind, &hpFlags),
			Run:      command.Adapt(runDebugHashpass),
		},
		{
			Name:     "totp",
			Usage:    "[flags] <otp-secret>",
			Help:     "Generate an initial TOTP code and an OTP URL.",
			SetFlags: command.Flags(flax.MustBind, &otpFlags),
			Run:      command.Adapt(runDebugTOTP),
		},
	},
}

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