connection.py 文件源码

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

项目:lib9 作者: Jumpscale 项目源码 文件源码
def logout(self):
        if not hasattr(self, "basicAuth") or not hasattr(self, "cookiejar"):
            return

        if self.basicAuth or not self.cookiejar:
            return

        # check our cookie and logout if needed
        for cookie in self.cookiejar:
            if cookie.name == "auth":
                # this following part is just mimicking the webui
                cookieIndex = ord(cookie.value[0]) - ord("a")
                self.setAttribute("M1", 40038, chr(cookieIndex), 0)

                # remove the cookie from our jar
                self.cookiejar.clear(cookie.domain, cookie.path, cookie.name)
                break
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号