Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regex capture issues pointed out in #400 #425

Merged
merged 2 commits into from
Feb 26, 2022

Conversation

mkienow-r7
Copy link
Contributor

@mkienow-r7 mkienow-r7 commented Feb 23, 2022

Description

Fixes regex capture issues pointed out in #400.

Motivation and Context

Fix regex issues discovered after adding missing example capture group attributes.

How Has This Been Tested?

  • Verified "Windows 10 Mobile" os.edition was not incorrectly captured
    $ echo "Windows 10 Mobile Edition" | ./bin/recog_match xml/operating_system.xml
    MATCH: {"matched"=>"Windows 10 Mobile", "os.vendor"=>"Microsoft", "os.family"=>"Windows", "os.product"=>"Windows 10 Mobile", "os.edition"=>nil, "os.device"=>"Mobile", "os.cpe23"=>"cpe:/o:microsoft:windows_10_mobile:-", "service.protocol"=>"", "fingerprint_db"=>"operating_system.name", "data"=>"Windows 10 Mobile Edition"}
    
    $ echo "Windows 10 Mobile" | ./bin/recog_match xml/operating_system.xml
    MATCH: {"matched"=>"Windows 10 Mobile", "os.vendor"=>"Microsoft", "os.family"=>"Windows", "os.product"=>"Windows 10 Mobile", "os.edition"=>nil, "os.device"=>"Mobile", "os.cpe23"=>"cpe:/o:microsoft:windows_10_mobile:-", "service.protocol"=>"", "fingerprint_db"=>"operating_system.name", "data"=>"Windows 10 Mobile"}
    
  • rake tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have updated the documentation accordingly (or changes are not required).
  • I have added tests to cover my changes (or new tests are not required).
  • All new and existing tests passed.

Copy link
Contributor

@tsellers-r7 tsellers-r7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment.

xml/operating_system.xml Outdated Show resolved Hide resolved
@mkienow-r7 mkienow-r7 merged commit 762acd7 into rapid7:master Feb 26, 2022
@mkienow-r7 mkienow-r7 deleted the bug/pr-400-fixup branch February 26, 2022 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants