You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If merged this pull request will allow multiple json databases to be used for pattern matching. Users can use private databases--they will just have to be in the same format as the emba.json and they will have to be placed in the correct location.
Proposed changes
I've created a new dictionary of dictionaries to store all the json databases (each json file as a single entry in the dictionary).
I am noticing one bug. Let's take the busybox example binary which is in the emba.json database. When the patterns get matched against the emba.json, it finds 3 matches in the containsLibrary list. But when I have two json databases, both get added to a new dictionary and if I remove the busybox entry from emba.json and add it to the new json database, all of a sudden when the pattern matching occurs, it only returns one match. It seems like it breaks out of the loop once a single match is found. But this behavior doesn't occur with the original emba.json database. With that one, it is capable of finding multiple matches and only breaks out once all the patterns are traversed.
Edit: This might be a logic issue. I looked at the combined json dictionary and the format and structure of it looked fine. The dictionary is only one layer deeper than it previously was.
Then, I thought it could be an issue with encoding the data. When I copy pasted the busybox patterns from emba.json to the second json DB, there might've been subtle differences with special/invisible characters that didn't copy over, but after checking with diff, they were both identical. Will continue looking into this.
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
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.
Summary
If merged this pull request will allow multiple json databases to be used for pattern matching. Users can use private databases--they will just have to be in the same format as the emba.json and they will have to be placed in the correct location.
Proposed changes
I've created a new dictionary of dictionaries to store all the json databases (each json file as a single entry in the dictionary).