




已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 混凝土抗压强度试验方案
- 城市排水系统勘察与设计方案
- 照明系统能效监测方案
- 吸音材料制造工岗前环保及安全考核试卷含答案
- 2.6实数 说课稿 2024-2025学年北师大版数学八年级上册
- 化纤后处理工岗前QC管理考核试卷含答案
- 《心怀感恩 与爱同行》主题班会说课稿
- 收获机械制造工岗前工作技能考核试卷含答案
- 金融风险管理师班组评比知识考核试卷含答案
- 数据标注员复测测试考核试卷含答案
- 湖北省十堰市2024-2025学年高二上学期1月期末调研考试物理试题(含答案)
- 商圈市场调查报告
- 20以内加减法口算题(不进位不退位练习)
- 2023中国人工智能系列白皮书:AI+Art
- 2024年10月全国自考《财务管理学》试题及答案
- 《大学生心理健康教育》全套教学课件
- 住宅小区防雷安全管理制度
- 台球助教管理培训
- 2024-2030年中国船舶设计行业需求态势展望及发展战略分析报告
- 《非洲民间故事》整本书阅读 课件 五年级上册语文(统编版) 五年级上册语文整本书阅读 导读课件+讲义+阅读检测(统编版)
- DB35-T 1857-2019 茶庄园建设指南
评论
0/150
提交评论