NewContentSearchCmd returns a new instance of the 'search content' command.
()
| 230 | |
| 231 | // NewContentSearchCmd returns a new instance of the 'search content' command. |
| 232 | func NewContentSearchCmd() *cobra.Command { |
| 233 | |
| 234 | cmd := &cobra.Command{ |
| 235 | Args: cobra.MinimumNArgs(1), |
| 236 | Use: "content [query]", |
| 237 | Short: "Search for patterns within files in VirusTotal Intelligence", |
| 238 | Long: cmdContentSearchHelp, |
| 239 | Example: cmdContentSearchExample, |
| 240 | RunE: runContentSearchCmd, |
| 241 | } |
| 242 | |
| 243 | cmd.Flags().BoolP( |
| 244 | "download", "d", false, |
| 245 | "download files that match the query") |
| 246 | cmd.Flags().BoolP( |
| 247 | "exact-matches-only", "e", false, |
| 248 | "exact matches only") |
| 249 | |
| 250 | addThreadsFlag(cmd.Flags()) |
| 251 | addIDOnlyFlag(cmd.Flags()) |
| 252 | addLimitFlag(cmd.Flags()) |
| 253 | addCursorFlag(cmd.Flags()) |
| 254 | |
| 255 | return cmd |
| 256 | } |
no test coverage detected