rapid7 / recog

Pattern recognition for hosts, services, and content
Other
671 stars 199 forks source link

Enable line numbers with recog_verify (and possibly other) warn/fail output #389

Closed dabdine closed 2 years ago

dabdine commented 2 years ago

Is your feature request related to a problem? Please describe. recog_verify does not produce line numbers, making it difficult to identify which fingerprints are problematic when running the command. For example:

xml/http_servers.xml: WARN: 'Apache' is missing an example that checks for parameter 'service.version' which is derived from a capture group
xml/http_servers.xml: WARN: 'Apache' is missing an example that checks for parameter 'apache.info' which is derived from a capture group
xml/http_servers.xml: WARN: 'Microsoft IIS 1.0 - 4.0 runs on Windows NT 4.0' is missing an example that checks for parameter 'service.version' which is derived from a capture group
xml/http_servers.xml: WARN: 'Microsoft IIS new, unknown Windows version' is missing an example that checks for parameter 'service.version' which is derived from a capture group
xml/http_servers.xml: WARN: 'Microsoft .NET Remoting and Common Language Runtime (CLR)' is missing an example that checks for parameter 'service.component.version' which is derived from a capture group

Describe the solution you'd like Make recog_verify produce line numbers when it encounters an issue.

Describe alternatives you've considered None.

mkienow-r7 commented 2 years ago

Thanks for opening the issue. I've thought about this while sifting through recog_verify output! A simple inline line number would be nice. xml/http_servers.xml:$LINE_NUM: WARN: ...