__init__.py 文件源码

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

项目:Isa-Framework 作者: c0hb1rd 项目源码 文件源码
def storage(self, session_id):
        # ?? Session ?????????????? Session ID
        session_path = os.path.join(self.__storage_path__, session_id)

        # ????? Session ???????????????
        if self.__storage_path__ is not None:
            data = {}
            for key, v in self.__session_map__[session_id].items():
                if key not in self.ignore_key:
                    data[key] = v
            with open(session_path, 'wb') as f:
                # ????????????
                content = json.dumps(data)

                # ?? base64 ??????????????????????????
                f.write(base64.encodebytes(content.encode()))

    # ???????
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号