Created
February 27, 2020 23:16
-
-
Save h4sh5/476fde0f8c95c8c2e1755d8dfbd01066 to your computer and use it in GitHub Desktop.
encode XML to SAML
This file contains 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
#!/usr/bin/env python | |
import zlib, base64 | |
import sys | |
import urllib | |
d = sys.stdin.read() | |
b = base64.b64encode(zlib.compress(d.encode('utf-8'))[2:-4]) | |
print urllib.quote_plus(b) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment