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

feat: Implement tag printing. #171

Merged
merged 4 commits into from
Aug 5, 2024
Merged

feat: Implement tag printing. #171

merged 4 commits into from
Aug 5, 2024

Conversation

wxsBSD
Copy link
Contributor

@wxsBSD wxsBSD commented Aug 3, 2024

This commit adds a -g argument to the scan command which will print the tags of matching rules.

One thing I realized (and this is also true for metadata) is that if there is no tags we are still including them in the JSON (just as an empty list). When we print in text mode we have checks if the tags are empty and skipping them if so.

I'm open to changing the JSON output so that we do not include a "meta" and "tags" key if they are empty.

wxsBSD added 2 commits August 3, 2024 18:54
This commit adds a -t argument to the scan command which will print the tags of
matching rules.

One thing I realized (and this is also true for metadata) is that if there is no
tags we are still including them in the JSON (just as an empty list). When we
print in text mode we have checks if the tags are empty and skipping them if so.

I'm open to changing the JSON output so that we do not include a "meta" and
"tags" key if they are empty.
This commit implements the -t flag which allows you to filter matched rules by
tag.
@wxsBSD
Copy link
Contributor Author

wxsBSD commented Aug 3, 2024

I also added in tag filtering. It currently works like -t does in original YARA.

@wxsBSD wxsBSD changed the title Implement tag printing. feat: Implement tag printing. Aug 3, 2024
@plusvic plusvic merged commit 0ee4100 into VirusTotal:main Aug 5, 2024
15 checks passed
@wxsBSD wxsBSD deleted the tags branch August 5, 2024 10:36
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