mirror of
https://github.com/BishopFox/sliver
synced 2026-06-08 10:29:05 +00:00
34 lines
853 B
Go
34 lines
853 B
Go
package monitor
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/bishopfox/sliver/client/console"
|
|
consts "github.com/bishopfox/sliver/client/constants"
|
|
)
|
|
|
|
// Commands returns the “ command and its subcommands.
|
|
func Commands(con *console.SliverClient) []*cobra.Command {
|
|
monitorCmd := &cobra.Command{
|
|
Use: consts.MonitorStr,
|
|
Short: "Monitor threat intel platforms for Sliver implants",
|
|
GroupID: consts.SliverHelpGroup,
|
|
}
|
|
monitorCmd.AddCommand(&cobra.Command{
|
|
Use: "start",
|
|
Short: "Start the monitoring loops",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
MonitorStartCmd(cmd, con, args)
|
|
},
|
|
})
|
|
monitorCmd.AddCommand(&cobra.Command{
|
|
Use: "stop",
|
|
Short: "Stop the monitoring loops",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
MonitorStopCmd(cmd, con, args)
|
|
},
|
|
})
|
|
|
|
return []*cobra.Command{monitorCmd}
|
|
}
|