pickle_verify_httpserver.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:code2sec.com 作者: bit4woo 项目源码 文件源码
def do_GET(self):
        if "?payload" in self.path:
            query= urllib.splitquery(self.path)
            action = query[1].split('=')[1]
            print action
            action = urllib.unquote(action)
            print action
            try:
                x = cPickle.loads(action) #string argv
                content = "command executed"
            except Exception,e:
                print e
                content = e
        else:
            content = "hello World"

        self.send_response(200)
        self.send_header("Content-type","text/html")
        self.end_headers()
        self.wfile.write("<html>")
        self.wfile.write(" %s " % content)
        self.wfile.write("</html>")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号