Crest Infosolutions Git Repository

Commit 1cde9c24 authored by Nathan Brahms's avatar Nathan Brahms Committed by brendon
Browse files

Update rule hash script

To
- Emit machine-friendly JSON
- Be executable
No related merge requests found
Showing with 3 additions and 3 deletions
+3 -3
#!/usr/bin/env python3
import json
import logging
import sys
......@@ -26,6 +28,4 @@ if __name__ == "__main__":
logger.info(f"Fetching '{args.config}'")
config = Config.from_config_list([args.config], None)[0]
rules = config.get_rules(True)
for rule in rules:
logger.debug(f"Hashing '{rule.id}'")
print(f"{rule.id},{rule.full_hash}")
print(json.dumps({r.id: r.full_hash for r in rules}))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment