Add basic command line interface

This commit is contained in:
nemunaire 2015-07-12 16:27:08 +02:00
parent cda781cf71
commit f48afca7e8
2 changed files with 22 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
cli/cli

21
cli/main.go Normal file
View File

@ -0,0 +1,21 @@
package main
import (
"flag"
"fmt"
"log"
"github.com/nemunaire/eyespot/eyespot/cipherts"
"github.com/nemunaire/eyespot/eyespot/protocolts"
)
func main() {
var protocol = flag.String("protocol", "tcp", "Protocol to test")
var hostname = flag.String("hostname", "localhost", "Hostname to test")
var port = flag.Int("port", 443, "Port to test")
flag.Parse()
host := fmt.Sprintf("%s:%d", *hostname, *port)
log.Println(protocolts.Run(*protocol, host))
log.Println(cipherts.Run(*protocol, host))
}