mirror of
https://github.com/lief-project/LIEF
synced 2026-06-08 15:30:44 +00:00
15 lines
256 B
Python
15 lines
256 B
Python
import lief
|
|
import json
|
|
import sys
|
|
|
|
if len(sys.argv) != 2:
|
|
print("Usage: {} <file>".format(sys.argv[0]))
|
|
sys.exit(1)
|
|
|
|
|
|
obj = lief.parse(sys.argv[1])
|
|
|
|
json_data = json.loads(lief.to_json(obj))
|
|
|
|
print(json.dumps(json_data, sort_keys=True, indent=4))
|