# $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. shell问题(转)

    一个同学问我一个问题,说有以下文件内容,要求输出为特定的格式.这里就献丑给出一个处理的方法吧,由于时间关系可能我的答案并不是最好的,但是我尽量将我的答案讲解明白,让你理解处理的方法.如果您有简单明了的 ...

  2. PHP 载入图像 imagecreatefrom_gif_jpeg_png 系列函数

    imagecreatefrom 系列函数用于从文件或 URL 载入一幅图像. 载入图像 imagecreatefrom 系列函数用于从文件或 URL 载入一幅图像,成功返回图像资源,失败则返回一个空字 ...

  3. oracle返回多个参数

    CREATE OR REPLACE PACKAGE BODY get_form_no_pub IS /*================================================ ...

  4. Celery 和 Redis 入门

    Celery 是一个广泛应用于网络应用程序的任务处理系统. 它可以在以下情况下使用: 在请求响应周期中做网络调用.服务器应当立即响应任何网络请求.如果在请求响应周期内需要进行网络调用,则应在周期外完成 ...

  5. Oracle linux6.1配置yum本地源

    一.准备工作1. Linux安装盘插入光驱2. 挂载光驱 [root@localhost ~]# mount /dev/cdrom /mnt/ mount: block device /dev/sr0 ...

  6. 58. N-Queens && N-Queens II

    N-Queens The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no tw ...

  7. Django model 中meta options

    之前学了abstract,这是后续的一些options app_label: app_label的作用是:如果一个model定义不在INSTALLED_APPS中,那么此时就需要声明,这个model的 ...

  8. 含大量行的订单创建时候creditlimit校验最耗时间

    含大量行的订单创建时候creditlimit校验最耗时间

  9. jsp与Servlet

  10. ASP.NET MVC 5 一 入门

    本系类教程将要构建ASP.NET MVC 5 Web 应用程序,使用的工具是VS2013 .现在有预览版可以下载了, 点击下载VS2013 FOR WEB ISO文件 .VS2012 还没用几天呢,2 ...