ssh.py 文件源码

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

项目:SameKeyProxy 作者: xzhou 项目源码 文件源码
def check_auth_password(self, username, password): 
        self.log.info("SSHServer: got username:%s password:%s" \
                      % (username, password))
        try:
            # Try the authentication to the server and return the response
            self.sshproto.destt.auth_password(username, password)
        except paramiko.AuthenticationException:
            self.log.error("SSHProtocol: BAAAD AUTH")
            return paramiko.AUTH_FAILED

        return paramiko.AUTH_SUCCESSFUL

        #if (username == 'sshtest') and (password == 'Intrepi0wn!'):
            #return paramiko.AUTH_SUCCESSFUL
        return paramiko.AUTH_FAILED
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号