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

Load .json.gz files directly #1883

Closed
mr-tz opened this issue Nov 29, 2023 · 3 comments · Fixed by #1990
Closed

Load .json.gz files directly #1883

mr-tz opened this issue Nov 29, 2023 · 3 comments · Fixed by #1990
Labels
dynamic related to dynamic analysis flavor enhancement New feature or request good first issue Good for newcomers

Comments

@mr-tz
Copy link
Collaborator

mr-tz commented Nov 29, 2023

Should we add support to load compressed JSON reports directly?

This simplifies loading files. Tests support this currently but not capa main.

@mr-tz mr-tz added enhancement New feature or request dynamic related to dynamic analysis flavor labels Nov 29, 2023
@williballenthin
Copy link
Collaborator

we should be able to taste the start of a compressed file and guess if it's a JSON report without too much effort.

the logic of doing the file type detection is getting a little complex, but there seems to be good reason for it all.

i think we should consider it.

@Exterminator11
Copy link

hey @williballenthin and @mr-tz, I would love to work on this issue. If you could give me a starting point it would be great😃.
Thanks

@mr-tz
Copy link
Collaborator Author

mr-tz commented Jan 8, 2024

Here's how tests load json.gz files:

def get_cape_extractor(path):

The main capa code should handle this somewhere around the usage/implementation of this function:

def get_auto_format(path: Path) -> str:

@mr-tz mr-tz added the good first issue Good for newcomers label Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dynamic related to dynamic analysis flavor enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants