-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add json output to scan command.
When using scan command you can now output in json or json-pretty format. The former is just a single JSON string per line while the latter is a pretty-printed JSON object. Due to the output subsystem you can do things like: ./yr scan --output-format json rules/test.yara /bin | jq .path and it will work, but you won't see the information about currently scanning files or the "final" message which tells you the number of files scanned. I'm guessing this is because the superscan is aware that stdout is being redirected somehow? Either way, this is a nice feature because it means we get the ability to pipe the JSON output to things like jq easily.
- Loading branch information
Showing
2 changed files
with
144 additions
and
46 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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