ValidateFingerEngines validates the finger engine configuration
()
| 398 | |
| 399 | // ValidateFingerEngines validates the finger engine configuration |
| 400 | func (opt *Option) ValidateFingerEngines() error { |
| 401 | if opt.FingerEngines != "all" { |
| 402 | // Import fingers package for AllEngines |
| 403 | allEngines := []string{"fingers", "fingerprinthub", "wappalyzer", "ehole", "goby", "nmap", "favicon"} |
| 404 | for _, name := range strings.Split(opt.FingerEngines, ",") { |
| 405 | if !iutils.StringsContains(allEngines, name) { |
| 406 | return fmt.Errorf("invalid finger engine: %s, please input one of %v", name, allEngines) |
| 407 | } |
| 408 | } |
| 409 | } |
| 410 | return nil |
| 411 | } |
| 412 | |
| 413 | // LoadDynamicFingers loads custom finger YAML files from paths or URLs |
| 414 | // This method should be called after the finger engine is initialized |