我一直在寻找将特殊 url 重定向到远程服务器以进行 XSS 测试的语法。有任何想法吗?
import SimpleHTTPServer
import SocketServer
class myHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_GET(self):
print self.path
if self.path == '/analog':
-------------------->return "http://12b.dk/analog"???
return SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
theport = 1234
Handler = myHandler
pywebserver = SocketServer.TCPServer(("", theport), Handler)
print "Python based web server. Serving at port", theport
pywebserver.serve_forever()