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

Update README.md testing matches to set grep color to never #564

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

mkienow-r7
Copy link
Contributor

@mkienow-r7 mkienow-r7 commented Apr 17, 2023

Description

Updates README.md testing matches examples to set the grep color to never to avoid possible issues.

I discovered having grep aliased to grep --color=always caused some confusion when experimenting with the new examples under the "Testing matches" section added in #557.

$ echo 'laravel_session=eyJ...etc..etc...%3D; expires=Mon, 13-Mar-2023 16:48:58 GMT; Max-Age=7200; path=/; httponly; samesite=lax' | bin/recog_match xml/http_cookies.xml -
MATCH: {"matched"=>"Laravel PHP web application framework", "service.vendor"=>"Laravel", "service.product"=>"Laravel", "service.cpe23"=>"cpe:/a:laravel:laravel:-", "service.protocol"=>"http", "fingerprint_db"=>"http_header.cookie", "data"=>"laravel_session=eyJ...etc..etc...%3D; expires=Mon, 13-Mar-2023 16:48:58 GMT; Max-Age=7200; path=/; httponly; samesite=lax"}

$ echo 'Set-Cookie: laravel_session=eyJ...etc..etc...%3D; expires=Mon, 13-Mar-2023 16:48:58 GMT; Max-Age=7200; path=/; httponly; samesite=lax' | grep -i '^Set-Cookie:' | cut -d: -f2- | bin/recog_match xml/http_cookies.xml -
FAIL:  laravel_session=eyJ...etc..etc...%3D; expires=Mon, 13-Mar-2023 16:48:58 GMT; Max-Age=7200; path=/; httponly; samesite=lax
$ echo 'Set-Cookie: laravel_session=eyJ...etc..etc...%3D; expires=Mon, 13-Mar-2023 16:48:58 GMT; Max-Age=7200; path=/; httponly; samesite=lax' | grep -i '^Set-Cookie:' | cut -d: -f2- | hexdump -C
C
00000000  1b 5b 6d 1b 5b 4b 20 6c  61 72 61 76 65 6c 5f 73  |.[m.[K laravel_s|
00000000  1b 5b 6d 1b 5b 4b 20 6c  61 72 61 76 65 6c 5f 73  |.[m.[K laravel_s|
...

$ echo 'Set-Cookie: laravel_session=eyJ...etc..etc...%3D; expires=Mon, 13-Mar-2023 16:48:58 GMT; Max-Age=7200; path=/; httponly; samesite=lax' | grep -i --color=never '^Set-Cookie:' | cut -d: -f2- | hexdump -CC
00000000  20 6c 61 72 61 76 65 6c  5f 73 65 73 73 69 6f 6e  | laravel_session|
00000000  20 6c 61 72 61 76 65 6c  5f 73 65 73 73 69 6f 6e  | laravel_session|
...

$ echo 'Set-Cookie: laravel_session=eyJ...etc..etc...%3D; expires=Mon, 13-Mar-2023 16:48:58 GMT; Max-Age=7200; path=/; httponly; samesite=lax' | grep -i --color=never '^Set-Cookie:' | cut -d: -f2- | bin/recog_match xml/http_cookies.xml -
MATCH: {"matched"=>"Laravel PHP web application framework", "service.vendor"=>"Laravel", "service.product"=>"Laravel", "service.cpe23"=>"cpe:/a:laravel:laravel:-", "service.protocol"=>"http", "fingerprint_db"=>"http_header.cookie", "data"=>"laravel_session=eyJ...etc..etc...%3D; expires=Mon, 13-Mar-2023 16:48:58 GMT; Max-Age=7200; path=/; httponly; samesite=lax"}

Motivation and Context

Help reduce the barrier to testing Recog fingerprint matches

How Has This Been Tested?

See notes under description

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.

@mkienow-r7 mkienow-r7 changed the title Update readme testing matches to set grep color to never Update README.md testing matches to set grep color to never Apr 17, 2023
@mkienow-r7 mkienow-r7 requested a review from adfoster-r7 April 17, 2023 18:34
@mkienow-r7 mkienow-r7 merged commit 19a17d6 into rapid7:main Apr 18, 2023
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