Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Add hashpw utility for generating password hashes

rcourtmanf9ca2c0e6820
diff --git a/cmd/hashpw/main.go b/cmd/hashpw/main.go
new file mode 100644
index 0000000000..45557dec6e
--- /dev/null
+++ b/cmd/hashpw/main.go
@@ -0,0 +1,24 @@
+package main
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/rcourtman/pulse-go-rewrite/internal/auth"
+)
+
+func main() {
+ if len(os.Args) < 2 {
+ fmt.Println("Usage: hashpw <password>")
+ os.Exit(1)
+ }
+
+ password := os.Args[1]
+ hash, err := auth.HashPassword(password)
+ if err != nil {
+ fmt.Printf("Error: %v\n", err)
+ os.Exit(1)
+ }
+
+ fmt.Println(hash)
+}