if index == 4:
child.close()
sys.exit(TIME_OUT_ERROR)
if index == 4:
child.close()
sys.exit(TIME_OUT_ERROR)
print "input root_pwd"
if index == 1:
child.sendline(rootPwd)
index = child.expect(keys)
print index,"*****"
if index == 1:
print 'password error!'
sys.exit(PASS_ERROR)
if index == 3:
child.close()
sys.exit(TIME_OUT_ERROR)
if index == 4:
child.close()
sys.exit(SSH_CON_ERROR)
阅读(444) | 评论(0) | 转发(0) |