Skip to content

Processing Json output #3

@agibbons27

Description

@agibbons27

The current json output is not formatted to allow for easy processing of BitsParser output in additional tools. There is a small change that can make the output easier to process.

https://github.com/fireeye/BitsParser/blob/master/BitsParser.py#L341

Current output code:

# Output unique jobs
if job.hash not in self.visited_jobs:
    formatted_job = json.dumps(job.job_dict, indent=4)
    print(formatted_job)

Potential change:

# Output unique jobs
if job.hash not in self.visited_jobs:
    json.dump(job.job_dict, sys.stdout)
    print()

The print() call is needed to ensure each result in the output file is on a separate line.

Maybe an option could be added to specify output type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions