Add basic command line interface
This commit is contained in:
parent
cda781cf71
commit
f48afca7e8
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
cli/cli
|
21
cli/main.go
Normal file
21
cli/main.go
Normal 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))
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user