scramblesuit.py 文件源码

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

项目:pupy 作者: ru-faraon 项目源码 文件源码
def get_public_server_options( cls, transportOptions ):
        """
        Return ScrambleSuit's BridgeDB parameters, i.e., the shared secret.

        As a fallback mechanism, we return an automatically generated password
        if the bridge operator did not use `ServerTransportOptions'.
        """

        #log.debug("Tor's transport options: %s" % str(transportOptions))

        if not "password" in transportOptions:
            #log.warning("No password found in transport options (use Tor's " \
            #            "`ServerTransportOptions' to set your own password)." \
            #            "  Using automatically generated password instead.")
            srv = state.load()
            transportOptions = {"password":
                                base64.b32encode(srv.fallbackPassword)}
            cls.uniformDHSecret = srv.fallbackPassword

        return transportOptions
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号