added server password support as command line arguement (#13)
This commit is contained in:
committed by
Tim Cooper
parent
4d141b6131
commit
c15344203a
@@ -16,6 +16,7 @@ func main() {
|
|||||||
// Command line flags
|
// Command line flags
|
||||||
server := flag.String("server", "localhost:64738", "the server to connect to")
|
server := flag.String("server", "localhost:64738", "the server to connect to")
|
||||||
username := flag.String("username", "", "the username of the client")
|
username := flag.String("username", "", "the username of the client")
|
||||||
|
password := flag.String("password", "", "the password of the server")
|
||||||
insecure := flag.Bool("insecure", false, "skip server certificate verification")
|
insecure := flag.Bool("insecure", false, "skip server certificate verification")
|
||||||
certificate := flag.String("certificate", "", "PEM encoded certificate and private key")
|
certificate := flag.String("certificate", "", "PEM encoded certificate and private key")
|
||||||
|
|
||||||
@@ -28,6 +29,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
b.Config.Username = *username
|
b.Config.Username = *username
|
||||||
|
b.Config.Password = *password
|
||||||
|
|
||||||
if *insecure {
|
if *insecure {
|
||||||
b.TLSConfig.InsecureSkipVerify = true
|
b.TLSConfig.InsecureSkipVerify = true
|
||||||
|
|||||||
Reference in New Issue
Block a user