Add basic command line interface
This commit is contained in:
parent
cda781cf71
commit
f48afca7e8
2 changed files with 22 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue