use cobra args, not os.Args
This commit is contained in:
parent
291cbaabd4
commit
3ff47dfa19
@ -46,7 +46,7 @@ Example usage:
|
|||||||
// Transmit
|
// Transmit
|
||||||
fmt.Println("Transmitting knock sequence:", ports)
|
fmt.Println("Transmitting knock sequence:", ports)
|
||||||
for _, port := range ports {
|
for _, port := range ports {
|
||||||
conn, _ := net.Dial("udp", fmt.Sprintf("%s:%d", os.Args[1], port))
|
conn, _ := net.Dial("udp", fmt.Sprintf("%s:%d", args[0], port))
|
||||||
conn.Write([]byte{0})
|
conn.Write([]byte{0})
|
||||||
conn.Close()
|
conn.Close()
|
||||||
time.Sleep(time.Millisecond * 200) // TBD: Make this configurable with flag (maxJitter)
|
time.Sleep(time.Millisecond * 200) // TBD: Make this configurable with flag (maxJitter)
|
||||||
|
Loading…
Reference in New Issue
Block a user