diff --git a/README.md b/README.md index 3267625..5fc010e 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,7 @@ PROBES: -bp, -body-preview display first N characters of response body (default 100) -server, -web-server display server name -td, -tech-detect display technology in use based on wappalyzer dataset + -cff, -custom-fingerprint-file string path to a custom fingerprint file for technology detection -method display http request method -websocket display server using websocket -ip display host ip diff --git a/runner/options.go b/runner/options.go index 68305f5..1c05397 100644 --- a/runner/options.go +++ b/runner/options.go @@ -257,6 +257,7 @@ type Options struct { NoFallback bool NoFallbackScheme bool TechDetect bool + CustomFingerprintFile string TLSGrab bool protocol string ShowStatistics bool @@ -383,6 +384,7 @@ func ParseOptions() *Options { flagSet.DynamicVarP(&options.ResponseBodyPreviewSize, "body-preview", "bp", 100, "display first N characters of response body"), flagSet.BoolVarP(&options.OutputServerHeader, "web-server", "server", false, "display server name"), flagSet.BoolVarP(&options.TechDetect, "tech-detect", "td", false, "display technology in use based on wappalyzer dataset"), + flagSet.StringVarP(&options.CustomFingerprintFile, "custom-fingerprint-file", "cff", "", "path to a custom fingerprint file for technology detection"), flagSet.BoolVar(&options.OutputMethod, "method", false, "display http request method"), flagSet.BoolVar(&options.OutputWebSocket, "websocket", false, "display server using websocket"), flagSet.BoolVar(&options.OutputIP, "ip", false, "display host ip"), diff --git a/runner/runner.go b/runner/runner.go index d54f662..1537a44 100644 --- a/runner/runner.go +++ b/runner/runner.go @@ -119,7 +119,12 @@ func New(options *Options) (*Runner, error) { if options.Wappalyzer != nil { runner.wappalyzer = options.Wappalyzer } else if options.TechDetect || options.JSONOutput || options.CSVOutput || options.AssetUpload { - runner.wappalyzer, err = wappalyzer.New() + runner.wappalyzer, err = func() (*wappalyzer.Wappalyze, error) { + if options.CustomFingerprintFile != "" { + return wappalyzer.NewFromFile(options.CustomFingerprintFile, true, true) + } + return wappalyzer.New() + }() } if err != nil { return nil, errors.Wrap(err, "could not create wappalyzer client")