Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AppHelpTemplate = `` /* 464-byte string literal not displayed */
AppHelpTemplate custom app help template
View Source
var CommandHelpTemplate = `` /* 202-byte string literal not displayed */
CommandHelpTemplate custom command help template
View Source
var Commands = []cli.Command{ { Name: "scan", Usage: "Scan a file", Description: "File to be scanned.", Flags: []cli.Flag{ cli.BoolFlag{ Name: "logs", Usage: "Display the Logs of the Plugin containers", }, }, Action: func(c *cli.Context) error { return cmdScan(c.Args().First(), c.Bool("logs")) }, }, { Name: "watch", Usage: "Watch a folder", Description: "Folder to be watched.", Flags: []cli.Flag{ cli.BoolFlag{ Name: "logs", Usage: "Display the Logs of the Plugin containers", }, }, Action: func(c *cli.Context) error { return cmdWatch(c.Args().First(), c.Bool("logs")) }, }, { Name: "lookup", Usage: "Look up a file hash (md5/sha1)", ArgsUsage: "hash of file to lookup `HASH`", Flags: []cli.Flag{ cli.BoolFlag{ Name: "logs", Usage: "Display the Logs of the Plugin containers", }, }, Action: func(c *cli.Context) error { if c.Args().Present() { return cmdLookUp(c.Args().First(), c.Bool("logs")) } log.Error("Please supply a MD5/SHA1 hash to query.") return nil }, }, { Name: "elk", Usage: "Start the ELK docker container", Description: "This ELK container will attach to the ElasticSearch data for all previous malice scans.", Flags: []cli.Flag{ cli.BoolFlag{ Name: "logs", Usage: "Display the Logs from the ELK Container", }, }, Action: func(c *cli.Context) error { return cmdELK(c.Bool("logs")) }, }, { Name: "plugin", Usage: "List, Install or Remove Plugins", Subcommands: []cli.Command{ { Name: "list", Usage: "list enabled installed plugins", Flags: []cli.Flag{ cli.BoolFlag{ Name: "all", Usage: "display all installed plugins", }, cli.BoolFlag{ Name: "detail,d", Usage: "display plugin details", }, }, Action: func(c *cli.Context) error { return cmdListPlugins(c.Bool("all"), c.Bool("detail")) }, }, { Name: "install", Usage: "install plugin", Action: func(c *cli.Context) error { return cmdInstallPlugin(c.Args().First()) }, }, { Name: "remove", Usage: "remove plugin", Action: func(c *cli.Context) error { return cmdRemovePlugin(c.Args().First()) }, }, { Name: "update", Usage: "update plugin", Flags: []cli.Flag{ cli.BoolFlag{ Name: "all", Usage: "update all installed plugins", }, cli.BoolFlag{ Name: "s,source", Usage: "update plugin from source repo", }, }, Action: func(c *cli.Context) error { return cmdUpdatePlugin(c.Args().First(), c.Bool("all"), c.Bool("source")) }, }, }, BashComplete: func(c *cli.Context) { if len(c.Args()) > 0 { return } for _, t := range tasks { fmt.Println(t) } }, }, }
Commands are the codegangsta/cli commands for Malice
Functions ¶
func CmdNotFound ¶
CmdNotFound outputs a formatted command not found message
func NewWatcher ¶
func NewWatcher(folder string)
NewWatcher creates a new watcher for the user supplied folder
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.