weixinInterface.py 文件源码

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

项目:Weixin-Backstage 作者: liyouvane 项目源码 文件源码
def GET(self):
        #??????
        data = web.input()
        signature=data.signature
        timestamp=data.timestamp
        nonce=data.nonce
        echostr=data.echostr
        #???token
        token="YourToken" #????????????????token
        #?????
        list=[token,timestamp,nonce]
        list.sort()
        sha1=hashlib.sha1()
        map(sha1.update,list)
        hashcode=sha1.hexdigest()
        #sha1????        

        #??????????????echostr
        if hashcode == signature:
            return echostr
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号