command-trigger

command module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2026 License: GPL-3.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

command-trigger

Just trigger one command and get its result by HMACed UDP

usage

  -D    debug-level log output
  -d int
        max valid time diff (default 5)
  -e string
        execute this command on triggered
  -g    generate a random key and exit
  -h    display this help
  -i int
        min execute interval (default 10)
  -k string
        64 bytes hmac key in base16384 format
  -m string
        send additional message
  -t string
        send/recv trigger to this addr:port
  -w uint
        max wait seconds for reply of executer (default 16)

example

Windows

  • trigger
go run main.go main_windows.go -t 127.0.0.1:8000 -k "抿淀檆健" -m "hello world"
[INFO] send trigger to 127.0.0.1:8000 : hello world
[INFO] 127.0.0.1:8000 reply: 123
  • executer
go run main.go main_windows.go -t 127.0.0.1:8000 -k "抿淀檆健" -e "cmd /c echo 123" 
[INFO] 127.0.0.1:56626 triggered with message: hello world
[INFO] get result: 123

unix

  • trigger
go run main.go -t 127.0.0.1:8000 -k "抿淀檆健" -m "hello world"
[INFO] send trigger to 127.0.0.1:8000 : hello world
[INFO] 127.0.0.1:8000 reply: 123
  • executer
go run main.go -t 127.0.0.1:8000 -k "抿淀檆健" -e "cmd /c echo 123" 
[INFO] 127.0.0.1:56626 triggered with message: hello world
[INFO] get result: 123

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package packet is the UDP packet to be sent
Package packet is the UDP packet to be sent

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址