Acid.py 文件源码

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

项目:acid 作者: PackeTsar 项目源码 文件源码
def __init__(self, username="admin", password="admin", hostname="192.168.1.1"):
        self.username = username
        self.password = password
        self.hostname = hostname
        self.baseurl = "https://" + self.hostname
        try:
            self.gcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
        except AttributeError:
            try:
                self.gcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1_1)
            except AttributeError:
                self.gcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        self.cj = CookieJar()
        self.opener = build_opener(HTTPCookieProcessor(self.cj), HTTPSHandler(context=self.gcontext))
        self.loginresponse = self._login()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号