Created
May 2, 2016 18:34
-
-
Save tkaemming/c3a57cd9d0b3377803c70d01866fb1d9 to your computer and use it in GitHub Desktop.
read a raw http payload (piped from from nc) for sentry and dump it as formatted json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64, json, sys, zlib | |
request = sys.stdin.read() | |
headers, payload = request.split('\r\n\r\n', 1) | |
result = json.loads(zlib.decompress(base64.b64decode(payload))) | |
sys.stdout.write(json.dumps(result, indent=2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment