




已阅读5页,还剩6页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
9806自动调速运行工具:secureCRT 6.7 作者:鲍继川程序语言:vbs邮箱:1. 原理1,通过9806 表找到 svlan,telnet进去2通过cvlan找到端口3输入带宽,激活,保存即完成2 9806.xls文件987 988 3运行效果图4实际运行效果:5实际运行脚本# # Welcome to ZTE 9806H # # Press Return to get started # # Copyright 2005-2010 , ZTE Co.,Ltd. # #Login:adminPassword:_9806enPlease input password:_9806# config_9806(config)# show vlan 154VLANID : 154VLANName : VLAN154EncapType : allMember-limit : disableSLOT PVC Egress/UnTag PORTLIST-1 1 Egress 3 UnTag 3-5 Egress 1 UnTag -_9806(config)# interface adsl 1/_9806(cfg-if-adsl-1/3)# adsl profile 8M.PRF_9806(cfg-if-adsl-1/3)# exit_9806(config)# exit_9806# save 6程序代码# $language = VBScript# $interface = 1.0Sub mainConst ForReading = 1, ForWriting = 2, ForAppending = 8strx=et.exeKillProc(strx) crt.screen.synchronous = true Dim app, wb, ws Set app = CreateObject(et.Application) Set wb = app.Workbooks.Open (C:9806.xls,1,false) Set ws = wb.Sheets(宽带) 选择指定Sheet1iRowCount = ws.usedRange.Rows.Count app.Visible = falsewb.Savewb.Closeapp.Quitdim svlandim cvlandim banddim profilesvlan=inputbox(请输入svlan,第一个端口值:,911)cvlan=inputbox(请输入cvlan,第二个端口值:,154)band=inputbox(请输入带宽 M,带宽:,8)Select case bandcase 2 profile=E2.PRFcase 4 profile=4M.PRFcase 4.5 profile=ITV.PRFcase 6.5 profile=NEW6-5M.PRFcase 7 profile=7.PRFcase 8 Profile=8M.PRFcase 8.5 Profile=8-5.PRFcase 9 Profile=9.PRFcase else exit subend selectDim objTabFor iLoop = 1 To iRowCountexs = Trim(ws.Cells(iLoop,3) 取Cells中的值if(exs=svlan) thenexc =Trim(ws.Cells(iLoop,4)ex=Split(exc)ic=UBound(ex)msgbox(iLoop)select case iccase 0c=Split(ex(0),-)if cvlan=c(0) and cvlanobjTab.Screen.Send en & chr(13)objTab.Screen.Send admin & chr(13)objTab.Screen.WaitForString #objTab.Screen.Send config & chr(13)objTab.Screen.WaitForString (config)#objTab.Screen.Send show vlan &cvlan&chr(13)objTab.Screen.WaitForString (config)#nrow=objTab.Screen.CurrentRowmsgbox(nrow)str2=objTab.Screen.Get(nrow-7,0,nrow-7,60)l=Left(Trim(str2),2)r=Right(Trim(str2),2)objTab.Screen.Send interface adsl &Trim(l)&/&Trim(r)&chr(13)objTab.Screen.WaitForString #objTab.Screen.Send adsl profile &profile&chr(13)objTab.Screen.WaitForString #objTab.Screen.Send exit&chr(13)objTab.Screen.WaitForString #objTab.Screen.Send exit&chr(13)objTab.Screen.WaitForString #objTab.Screen.Send copr r s &chr(13)objTab.Screen.WaitForString #objTab.Screen.Send save &chr(13)objTab.Screen.WaitForString #, 3Call objTab.Session.Log(False) objTab.Screen.Synchronous = False objTab.Session.Disconnect exit subend ifcase 1c=Split(ex(0),-)e=Split(ex(1),-)if (cvlan=c(0) and cvlan=e(0) and cvlan=objTab.Screen.Send en & chr(13)objTab.Screen.Send admin & chr(13)objTab.Screen.WaitForString #objTab.Screen.Send config & chr(13)objTab.Screen.WaitForString (config)#objTab.Screen.Send show vlan &cvlan&chr(13)objTab.Screen.WaitForString (config)#nrow=objTab.Screen.CurrentRowmsgbox(nrow)str2=objTab.Screen.Get(nrow-7,0,nrow-7,60)l=Left(Trim(str2),2)r=Right(Trim(str2),2)objTab.Screen.Send interface adsl &Trim(l)&/&Trim(r)&chr(13)objTab.Screen.WaitForString #objTab.Screen.Send adsl profile &profile&chr(13)objTab.Screen.WaitForString #objTab.Screen.Send exit&chr(13)objTab.Screen.WaitForString #objTab.Screen.Send exit&chr(13)objTab.Screen.WaitForString #objTab.Screen.Send copr r s &chr(13)objTab.Screen.WaitForString #objTab.Screen.Send save &chr(13)objTab.Screen.WaitForString #, 3Call objTab.Session.Log(False) objTab.Screen.Synchronous = False objTab.Session.Disconnect end ifcase 2c=Split(ex(0),-)e=Split(ex(1),-)f=Split(ex(2),-)if(cvlan=c(0) and cvlan=e(0) and cvlan=f(0) and cvlan=objTab.Screen.Send en & chr(13)objTab.Screen.Send admin & chr(13)objTab.Screen.WaitForString #objTab.Screen.Send config & chr(13)objTab.Screen.WaitForString (config)#objTab.Screen.Send show vlan &cvlan&chr(13)objTab.Screen.WaitForString (config)#nrow=objTab.Screen.CurrentRowmsgbox(nrow)str2=objTab.Screen.Get(nrow-7,0,nrow-7,60)l=Left(Trim(str2),2)r=Right(Trim(str2),2)objTab.Screen.Send interface adsl &Trim(l)&/&Trim(r)&chr(13)objTab.Screen.WaitForString #objTab.Screen.Send adsl profile &profile&chr(13)objTab.Screen.WaitForString #objTab.Screen.Send exit&chr(13)objTab.Screen.WaitForString #objTab.Screen.Send exit&chr(13)objTab.Screen.WaitForString #objTab.Screen.Send copr r s &chr(13)objTab.Screen.WaitForString #objTab.Screen.Send save &chr(13)objTab.Screen.WaitForString #, 3Call objTab.Session.Log(False) objTab.Screen.Synchronous = False objTab.Session.Disconnect end ifcase 3c=Split(ex(0),-)e=Split(ex(1),-)f=Split(ex(2),-)g=Split(ex(3),-)if(cvlan=c(0) and cvlan=e(0) and cvlan=f(0) and cvlan=g(0) and cvlan=objTab.Screen.Send en & chr(13)objTab.Screen.Send admin & chr(13)objTab.Screen.WaitForString #objTab.Screen.Send config & chr(13)objTab.Screen.WaitForString (config)#objTab.Screen.Send show vlan &cvlan&chr(13)objTab.Screen.WaitForString (config)#nrow=objTab.Screen.CurrentRowmsgbox(nrow)str2=objTab.Screen.Get(nrow-7,0,nrow-7,60)l=Left(Trim(str2),2)r=Right(Trim(str2),2)objTab.Screen.Send interface adsl &Trim(l)&/&Trim(r)&chr(13)objTab.Screen.WaitForString #objTab.Screen.Send adsl profile &profile&chr(13)objTab.Screen.WaitForString #objTab.Screen.Send exit&chr(13)objTab.Screen.WaitForString #objTab.Screen.Send exit&chr(13)objTab.Screen.WaitForString #objTab.Screen.Send copr r s &chr(13)objTab.Screen.WaitForString #objTab.Screen.Send save &chr(13)objTab.Screen.WaitForString #, 2Call objTab.Session.Log(False) objTab.Screen.Synchronous = False objTab.Session.Disconnect end ifcase elseend selectend ifNextwb.CloseSet wb=NothingSet ws=NothingSet app=Nothing app.Quit crt.screen.synchronous = falseEnd SubFunction
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- Focusky新年课件教学课件
- Excel课件筛选教学课件
- Excel表格操作课件
- Excel知识培训心得体会课件
- 6 我会穿衣服说课稿小学语文一年级下册人教版生活语文(特殊教育)
- 文库发布:etc课件
- 探索心灵之旅-认识心理(说课稿)2025-2026学年初三下学期教育主题班会
- eamma课件教学课件
- DR胸片课件教学课件
- 第2课 姿势与执笔教学设计小学书法西泠版三年级上册-西泠版
- 生产主管转正工作总结
- 2025至2030中国高纯铝行业发展趋势与行业发展研究与产业战略规划分析评估报告
- 西藏介绍课件
- 会务理论考试题及答案
- 2025年期货从业资格之《期货法律法规》真题附答案详解【巩固】
- 幼儿园各项安全管理制度汇编
- 2025年“安全生产年”工作总结(2篇)
- GB/T 2481.1-2025固结磨具用磨料粒度组成的检测和标记第1部分:粗磨粒F4~F220
- 2025-2026秋学生国旗下演讲稿:第4周涵养文明习惯点亮成长底色-养成教育
- 配电电缆故障定位试卷与答案
- 锦囊工程(修订版)
评论
0/150
提交评论