forked from drew/smtprelay
Remove cmd/hasher for bcrypt.
There are enough tools available as a replacement. You will find one that suits you.
This commit is contained in:
@@ -1,6 +0,0 @@
|
|||||||
|
|
||||||
To run the hasher, do like this
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ go run hasher.go hunter2
|
|
||||||
```
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"golang.org/x/crypto/bcrypt"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
if len(os.Args) != 2 {
|
|
||||||
fmt.Fprintln(os.Stderr, "Usage: hasher PASSWORD")
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
password := os.Args[1]
|
|
||||||
|
|
||||||
hash, err := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost)
|
|
||||||
if err != nil {
|
|
||||||
fmt.Fprintln(os.Stderr, "Error generating hash: %s", err)
|
|
||||||
}
|
|
||||||
fmt.Println(string(hash))
|
|
||||||
}
|
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
; authentication before they can send mail.
|
; authentication before they can send mail.
|
||||||
; File format: username bcrypt-hash [email[,email[,...]]]
|
; File format: username bcrypt-hash [email[,email[,...]]]
|
||||||
; username: The SMTP auth username
|
; username: The SMTP auth username
|
||||||
; bcrypt-hash: The bcrypt hash of the pasword (generate with "./hasher password")
|
; bcrypt-hash: The bcrypt hash of the pasword
|
||||||
; email: Comma-separated list of allowed "from" addresses:
|
; email: Comma-separated list of allowed "from" addresses:
|
||||||
; - If omitted, user can send from any address
|
; - If omitted, user can send from any address
|
||||||
; - If @domain.com is given, user can send from any address @domain.com
|
; - If @domain.com is given, user can send from any address @domain.com
|
||||||
|
|||||||
Reference in New Issue
Block a user