ADDED:
* envs.MustEnv(), envs.MustEnvNoBlank()

UPDATED:
* dep mods, Go version
This commit is contained in:
brent saner
2026-07-09 19:29:21 -04:00
parent d248d72b5a
commit 8e70ffac38
9 changed files with 857 additions and 41 deletions
+47 -1
View File
@@ -1,11 +1,57 @@
- refactor the elevation detection stuff. I'm not terribly happy with it.
- password generator utility/library
- add generic password prompt func that takes in a `prompt []byte` param and returns `(passwd []byte, err error)`
```
func getPasswd(prompt []byte) (passwd []byte, err error) {
var b []byte
var newLnd bool
var origIn *term.State
var origOut *term.State
var fdIn int = int(os.Stdin.Fd())
var fdOut int = int(os.Stdout.Fd())
if origIn, err = term.GetState(fdIn); err != nil {
return
}
if origOut, err = term.GetState(fdOut); err != nil {
return
}
defer func() {
var tErr error
if !newLnd {
fmt.Println()
}
if tErr = term.Restore(fdIn, origIn); tErr != nil {
return
}
if tErr = term.Restore(fdOut, origOut); tErr != nil {
return
}
}()
os.Stdout.Write(prompt)
if b, err = term.ReadPassword(fdIn); err != nil {
return
}
passwd = b
fmt.Println()
newLnd = true
return
}
```
- password generator/hash+salter and "checksum/hash guesser" utility/library
-- incorporate with r00t2.io/pwgen
-- incorporate with https://github.com/tredoe/osutil ?
-- cli flag to dump flat hashes too (https://github.com/hlandau/passlib and others soon in pwgen)
- auger needs to be build-constrained to linux.
-- (i think i fixed this)
- unit tests