def audit(arg):
port = 23
time = 5
user = 'admin'
password = '<<< %s(un=\'%s\') = %u'
finish = '->'
try:
t = telnetlib.Telnet(arg,port, timeout=time)
t.write(user + '\n')
t.read_until('password: ')
t.write(password + '\n')
str1 = t.read_until(finish)
t.write("?\n")
str = t.read_until(finish)
t.close()
if ('->' in str) and ('exec' in str):
security_hole(arg)
except Exception, e:
pass
评论列表
文章目录