# $language = "VBScript"
# $interface = "1.0" Sub Main Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso,file1,line,str1,params
Set fso = CreateObject("Scripting.FileSystemObject")
Set file1 = fso.OpenTextFile("D:\SWbackup\list2.txt",Forreading, False)
crt.Screen.Synchronous = True
do while file1.AtEndOfStream <> True
'读取每一行
line = file1.ReadLine
'分割IP,用户名,密码
params = Split (line)
crt.session.LogFileName = "D:\SWbackup\log\" & params(0) & ".txt"
crt.session.Log(true)
'telnet登录
crt.Session.Connect "/TELNET " & params(0) '输入用户名
crt.screen.WaitForString "Username:",1
crt.screen.send params(1) & Chr(13) '输入密码
crt.Screen.WaitForString "Password:"
crt.Screen.Send params(2) & Chr(13)
'进入特权模式(enable)
crt.Screen.Send "system-view" & Chr(13)
crt.Screen.waitForString "]"
'执行dis cur命令
crt.Screen.Send "dis cur" & Chr(13)
crt.Screen.Send " "
crt.screen.send Chr(13)
crt.Screen.waitForString "return"
crt.Screen.waitForString "]"
crt.screen.send Chr(13)
'执行dis ip int b命令
crt.Screen.Send "dis ip int b" & Chr(13)
crt.Screen.Send " "
crt.screen.send Chr(13)
crt.Screen.waitForString "]"
'执行dis int b命令
crt.Screen.Send "dis int b" & Chr(13)
crt.Screen.Send " "
crt.screen.send Chr(13)
crt.Screen.waitForString "]"
crt.screen.send Chr(13)
'断开连接
crt.Session.Disconnect loop
crt.Screen.Synchronous = False End Sub

SecureCRT自动备份脚本-华为的更多相关文章

  1. SecureCRT自动备份脚本-思科

    利用SecureCRT脚本对思科设备进行批量备份: (1)新建文本文件(注意保存路径,本次测试路径为D:\backup\list.txt): x.x.x.x username password ena ...

  2. Windows环境下Oracle数据库的自动备份脚本

    批处理文件(.bat) @echo off echo ================================================ echo  Windows环境下Oracle数据 ...

  3. Oracle自动备份脚本(网上找到的资料)

    废话不多说了,直接给大家贴代码了,具体代码如下所示: ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 ...

  4. Mysql 自动备份脚本

    转自: Mysql 自动备份脚本2 - - ITeye技术网站http://kangh.iteye.com/blog/2309091 备份方案: 备份主机:192.168.10.11 数据库服务器:1 ...

  5. oracle expdp自动备份脚本

    windows: @echo off echo ================================================ echo Windows环境下Oracle数据库的自动 ...

  6. Oracle自动备份脚本的实现

    问题描述: Oracle自动备份脚本的实现. 错误提示1: Message file RMAN.msb not found Verify that Oracle_HOME is set properl ...

  7. MySQL binlog 自动备份脚本

    MySQL binlog 自动备份脚本 1 利用shell进行备份 #!/bin/sh #mysql binlog backup script /usr/local/mysql/bin/mysqlad ...

  8. Oracle数据库的自动备份脚本

    @echo off echo ================================================ echo Windows环境下Oracle数据库的自动备份脚本 echo ...

  9. Windows环境下Oracle数据库的自动备份脚本自动删除30天前的备份

    @echo off echo ================================================ echo Windows环境下Oracle数据库的自动备份脚本 echo ...

随机推荐

  1. 无线路由器WDS简要

    A,B两台无线路由器,B去桥接A.在B中保持A相同的无线信道.在B中关闭DHCP.--A,B两台的SSID和无线安全设置都是独立的,无线安全可同可不同.

  2. RPC远程过程调用协议

    最近学习Hadoop.Hbase.Spark及Storm原理,经常会出现RPC这样的传输术语,为了更好地理解,将知识点详细的整理下吧~ RPC-----它是一种通过网络从远程计算机程序上请求服务,而不 ...

  3. UVA 1395 苗条的生成树(最小生成树+并查集)

    苗条的生成树 紫书P358 这题最后坑了我20分钟,怎么想都对了啊,为什么就wa了呢,最后才发现,是并查集的编号搞错了. 题目编号从1开始,我并查集编号从0开始 = = 图论这种题真的要记住啊!!题目 ...

  4. Cordova从服务器更新客户端的JS文件

    思路: 1.主要使用 Cordova的File插件 2.获取需要替换的js文件安装后的路径 3.软件使用js发起ajax请求,后台返回版本号跟客户端版本号对比 4.如果发现需要更新js文件,则用js调 ...

  5. 关于SoCFPGA 编译问答

    1.在Qsys里面添加了一个新的组件(不是hps里面的东西),挂在Avalon总线上,如添加了一个新ADC组件,是否需要重新编译dtb. 答:  不需要. 2.修改了相关Qsys里面的东西,是否也需要 ...

  6. 50. Remove Duplicates from Sorted Array && Remove Duplicates from Sorted Array II && Remove Element

    Remove Duplicates from Sorted Array Given a sorted array, remove the duplicates in place such that e ...

  7. 对SSH三大框架的理解

    SSH框架一般指的是Struts.Spring.Hibernate,后来Struts2代替了Struts.最近5年,Struts2已经被Spring MVC代替,而Hibernate基本也被iBati ...

  8. history 查看历史操作记录在shell脚本执行中无法显示问题

    今天使用shell脚本想查看历史操作命令的记录于是写了一个再简单不过的脚本,可是以chmod +x 权限执行./test.sh发现执行后没有任何反应.于是查找原因:将脚本文件中的#!/bin/bash ...

  9. Android自动化学习笔记之MonkeyRunner:MonkeyRunner环境搭建

    ---------------------------------------------------------------------------------------------------- ...

  10. 内省(Introspector)

    内省(Introspector) 是Java 语言对 JavaBean 类属性.事件的一种缺省处理方法 目的:主要用于传递数据信息,这种类中的方法主要用于访问私有的字段(且方法名符合某种命名规则) p ...