# $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. jquery获得图片的真实大小

    $(function(){ var imgSrc = $("#image").attr("src"); getImageWidth(imgSrc,functio ...

  2. JS--事件模块

    一.JS event 的浏览器兼容 说到JS事件,不能不先讲一下事件流 1 事件流的定义:事件流是指从页面中接收事件的顺序 如下图所示,假设有四个圆层叠在一起,如果我们单击图中最里面的那个圆,那么我们 ...

  3. Python入门1

    简介 Python的创始人为Guido van Rossum.1989年圣诞节期间,在阿姆斯特丹,Guido为了打发圣诞节的无趣,决心开发一个新的脚本解释程序,做为ABC 语言的一种继承.Python ...

  4. UML精粹2 - 开发过程

    迭代和瀑布过程 两者的本质区别是,你如何将一个项目分解为更小块. 瀑布风格基于活动来分解项目.为了构建软件,你不得不做某些活动:需求分析.设计.编码和测试.为期一年的项目可能有2个月的分析阶段,然后是 ...

  5. linux 安装软件程序

    1.用aptitude管理软件包 查看已安装的/未安装的等软件包 无法通过aptitude看到一个细节是所有跟某个特定软件包关联的所有文件的列表.利用dpkg命令能看到这个列表. dpkg -L pa ...

  6. 甲状腺癌怎样早发现 可B超检查

    2013-12-13 14:40:00.0 本文来源:人民网 点击参与跟帖 原标题:健康之道:甲状腺癌怎样早发现 摘要:甲状腺癌怎样早发现呢?隐早期以甲状腺结节的方式存在,且以匿方式生长,可能在人们偶 ...

  7. 11. Evaluate Reverse Polish Notation

    Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, ...

  8. VS2015 Android

    最近安装了VS2015,体验了一下android 的开发,按模板创建运行了个,试下效果很不错.也可以可视化设计.但昨天再次打开或创建一个android程序后,设计界面直接不能显示,显示错误:(可能是升 ...

  9. jexus

    Jexus web server V5.1 安装配置要点 一.Jexus简介:Jexus web server for linux 是一款基于.NET兼容环境,运行于Linux/unix操作系统之上, ...

  10. 【JavaScript】常用方法

    Jquery选择器参考:http://www.w3school.com.cn/jquery/jquery_selectors.asp 获取class="a"元素点击: $(&quo ...