smtp.py 文件源码

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

项目:hostapd-mana 作者: adde88 项目源码 文件源码
def _authResponse(self, auth, challenge):
        self._failresponse = self.esmtpAUTHDeclined

        try:
            challenge = base64.decodestring(challenge)
        except binascii.Error, e:
            # Illegal challenge, give up, then quit
            self.sendLine('*')
            self._okresponse = self.esmtpAUTHMalformedChallenge
            self._failresponse = self.esmtpAUTHMalformedChallenge
        else:
            resp = auth.challengeResponse(self.secret, challenge)
            self._expected = [235]
            self._okresponse = self.smtpState_from
            self.sendLine(encode_base64(resp, eol=""))

        if auth.getName() == "LOGIN" and challenge == "Username:":
            self._expected = [334]
            self._authinfo = auth
            self._okresponse = self.esmtpState_challenge
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号