mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-06 23:32:47 +01:00
14 lines
232 B
Python
Executable File
14 lines
232 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import sys
|
|
import json
|
|
import hashlib
|
|
|
|
|
|
def run(msg):
|
|
sha1 = hashlib.sha1(msg['payload']['default'].encode('utf-8'))
|
|
return {"hash": sha1.hexdigest()}
|
|
|
|
|
|
print(json.dumps(run(json.loads(sys.argv[1]))))
|