# $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. UIAutomator定位Android控件的方法

    UIAutomator各种控件定位的方法. 1. 背景 使用SDK自带的NotePad应用,尝试去获得在NotesList那个Activity里的Menu Options上面的那个Add note菜单 ...

  2. Type Project has no default.properties file! Edit the project properties to set one.

    Description Resource Path Location Type Project has no default.properties file! Edit the project pro ...

  3. [solr] - SolrJ增删查

    使用SolrJ进行对Solr的增.删.查功能. 参考引用: http://wiki.apache.org/solr/Solrj Eclipse中新建一个项目:TestSolr 其中SorlJ的Lib包 ...

  4. 使用Script Component源处理不规则平面文件

    微软 BI 系列随笔 - SSIS 2012 高级应用 - Script Component处理不规则平面文件 场景介绍 在使用SSIS从平面文件导入源数据时,最常遇到的是以下两种情况: 导入规则的平 ...

  5. ASP.NET MVC IOC 之AutoFac攻略

    一.为什么使用AutoFac? 之前介绍了Unity和Ninject两个IOC容器,但是发现园子里用AutoFac的貌似更为普遍,于是捯饬了两天,发现这个东东确实是个高大上的IOC容器~ Autofa ...

  6. South - 在 Django 中 Migrate Database

    Web 开发避免不了经常修改表结构,手工修改表结构不仅容易出错,而且涉及到多人协作开发时,这么土的做法很不经济. Django 的第三方 app South 就是专门做数据库表结构自动迁移的.Jaco ...

  7. TFS 2010 如何删除Collection

    在cmd  中 cd 到 目录 c:\Program Files\Microsoft Team Foundation Sever 2010\Tools 执行下面的命令: TfsConfig colle ...

  8. 慕课网-安卓工程师初养成-5-4 使用 Eclipse 调试程序

    来源:http://www.imooc.com/video/1627 IDE断点调试功能 比如 之前的程序,写错了,变成如下 package com.imooc; import java.util.S ...

  9. Android ImageView显示本地图片

    Android ImageView 显示本地图片 布局文件 <?xml version="1.0" encoding="utf-8"?> <R ...

  10. openldap权限sudo

    http://pig.made-it.com/ldap-sudoers.html https://www.lisenet.com/2015/convert-openldap-schema-to-ldi ...