| C:\snml2019\telnet\telnet_nms1.txt |
---|
001 | var {v_time} value datetime |
002 | screen.text at point {10} {30} string {2、telnet测试开始,当前时间:~v_time~} |
003 | |
004 | telnet.connect ip {192.168.186.132} port {23} |
005 | telnet.recv expect {Username:} |
006 | telnet.send {cisco%0a} |
007 | telnet.recv expect {Password} |
008 | |
009 | telnet.send {cisco%0a} |
010 | telnet.recv expect {>} |
011 | telnet.send {enable%0a} |
012 | telnet.set onrecv {More} send { } |
013 | telnet.set delay {200} ms after per byte send |
014 | telnet.send {show version%0a} |
015 | telnet.recv for {5} seconds |
016 | |
017 | #telnet.send {show run%0a} |
018 | #telnet.recv for {5} seconds |
019 | #telnet.send text |
020 | telnet.close |
021 | |
022 | var {v_time} value datetime |
023 | screen.text at point {10} {60} string {telnet测试完成,当前时间:~v_time~} |
024 | |
025 | run.end |