rapid7 / recog

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

Regex cross-language compatibility #367

Closed tsellers-r7 closed 3 years ago

tsellers-r7 commented 3 years ago

Description

The intent of this PR is to improve cross language compatibility for the regex patterns used.

The changes:

How Has This Been Tested?

rspec, 3rd party regex testors.

Types of changes

Fingerprint construction

Checklist:

tsellers-r7 commented 3 years ago

CC @hdm @pberry25 @dabdine

hdm commented 3 years ago

Seems great here! Any chance we can get a test case to scan new regexes for the incompatible variants? ([:digit:], non-leading ?i, etc).

tsellers-r7 commented 3 years ago

@hdm - I'm leaning towards an effort to separate the fingerprint databases into their own repo and then have language/tool specific tests that ensure that we know that patterns are valid in the standard/common regex libs for Ruby, Go, Java, etc and also pass the build in tests vs examples.

gschneider-r7 commented 3 years ago

See #138 for when tests for this can be accomplished :smiley: