feat: replace old readable string extraction with new filtered multi-string support#2787
Open
fabiodepin wants to merge 4 commits intontop:devfrom
Open
feat: replace old readable string extraction with new filtered multi-string support#2787fabiodepin wants to merge 4 commits intontop:devfrom
fabiodepin wants to merge 4 commits intontop:devfrom
Conversation
- Introduces a new function to retrieve multiple human-readable substrings from a payload, with optional filter callback support (e.g., for FQDN detection). - Replaces the old function with the new approach. - Increases size from 32 to 128 bytes to support longer string concatenations. - Renames all occurrences of to the correct spelling . - Replaces all calls to with , reflecting the new logic. References: ntop#2708
|
Collaborator
|
@fabiodepin, could you take a look at the errors in the regression tests, please? |
Contributor
Author
Hi, sure. I'll check and get back to you. |
utoni
reviewed
May 13, 2025
| * for short strings. These thresholds can be used to classify the randomness | ||
| * level of the string. | ||
| */ | ||
| static double calculate_entropy(const char *str) { |
Collaborator
There was a problem hiding this comment.
no need to re-implement, already present in the library; see ndpi_entropy()
Collaborator
|
Any updates or can we close this PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Please sign (check) the below before submitting the Pull Request:
[ X ] I have signed the ntop Contributor License Agreement at https://github.com/ntop/legal/blob/main/individual-contributor-licence-agreement.md
[ X ] I have read the contributing guidelines at https://github.com/ntop/nDPI/blob/dev/CONTRIBUTING.md
[ ] I have updated the documentation (in doc/) to reflect the changes made (if applicable)
Link to the related issue:
References #2708
Describe changes:
Feat: add extract_readable_strings with advanced filtering; refactor string handling