Skip to content

Json output olemeta#1

Merged
remotephone merged 3 commits intomasterfrom
json_output_olemeta
Mar 30, 2020
Merged

Json output olemeta#1
remotephone merged 3 commits intomasterfrom
json_output_olemeta

Conversation

@remotephone
Copy link
Copy Markdown
Owner

Update olemeta to provide json output with -o flag and to be run imported into other tools.

The olemeta tool works great to provide a table format for interactive use of the tool. I want to be able to import the tool into other scripts to automate some triage of malicious documents. This change would allow the user to provide a -o flag at runtime to generate output in json. Normal use of the tool would not change, but it could now be imported into other tools with something like:

from oletools import olemeta
import olefile

with open('file.doc', 'rb') as file:
    output = 'json'
    ole = olefile.OleFileIO(file)
    meta = olemeta.process_ole(ole)
    json_metadata = olemeta.process_output(meta, output)
    print(json_metadata)

@remotephone remotephone merged commit 9df10fe into master Mar 30, 2020
@remotephone remotephone deleted the json_output_olemeta branch March 30, 2020 20:47
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