ssh远程执行脚本无法启动应用程序cf挑战 您所在的位置:网站首页 ssh远程执行脚本 ssh远程执行脚本无法启动应用程序cf挑战

ssh远程执行脚本无法启动应用程序cf挑战

#ssh远程执行脚本无法启动应用程序cf挑战| 来源: 网络整理| 查看: 265

程序需要,我在网上找了很久才找到,刚刚把程序写好,并加写了注释,希望能帮助大家再写程序前先引用microsoftexcel11.0objectLibrary我看到的文章是10.0的,我这是office2003是11.0,只要安了excel就有这个引用~PrivateSubcmdsave_Click()MsgBox"文件保存为:D:\电网配电线路管理信息系统\信息查询结果\事故信息查询结果.xls"DimiAsIntegerDimjAsIntegerDimexAsObjectDimexwbookAsObjectDimexsheetAsObject

Setex=CreateObject("Excel.Application")Setexwbook=NothingSetexsheet=NothingSetexwbook=ex.Workbooks().AddSetexsheet=exwbook.Worksheets("sheet1")

'在excel里表格的表头,这是根据我的需要添加的标头ex.Range("c3").Value="日期"ex.Range("d3").Value="时间"ex.Range("e3").Value="站点"ex.Range("f3").Value="汇报人"ex.Range("g3").Value="线路双编号"ex.Range("h3").Value="保护动作类型"ex.Range("i3").Value="事故原因"ex.Range("j3").Value="处理负责人"ex.Range("k3").Value="处理方法"ex.Range("l3").Value="处理结果"ex.Range("m3").Value="结束时间"ex.Range("n3").Value="备注"'i为记录个数使用循环将数据全部添加Fori=1ToAdodc1.Recordset.RecordCountj=3 i'k为数据列数Fork=0To11'通过使用变量k和j变换单元格位置q=Chr(99 k)&j'将datagrid1的数据放到单元格内ex.Range(q).Value=DataGrid1.Columns(k)Nextk'指针下移IfAdodc1.Recordset.EOF=FalseThenAdodc1.Recordset.MoveNextEndIfNexti

'保存输入到事故信息查询结果.xlsexwbook.SaveAs"D:\电网配电线路管理信息系统\信息查询结果\事故信息查询结果.xls"'退出excelex.QuitEndSub我觉得这段程序很简单而且很使用,使用时不要打开事故信息查询结果.xls否则会报错存储时系统会自动提示是否更换文件,根据自己用发来用->

FunctionfDecode(sStringToDecode) 'ThisfunctionwilldecodeaBase64encodedstringandreturnsthedecodedstring. 'Thisbecomesusefullwhenattemptingtohidepasswordsfrompryingeyes. ConstCharList="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" DimiDataLength,sOutputString,iGroupInitialCharacter sStringToDecode=Replace(Replace(Replace(sStringToDecode,vbCrLf,""),vbTab,""),"","") iDataLength=Len(sStringToDecode) IfiDataLengthMod40Then fDecode="BadstringpassedtofDecode()function." ExitFunction EndIf ForiGroupInitialCharacter=1ToiDataLengthStep4 DimiDataByteCount,iCharacterCounter,sCharacter,iData,iGroup,sPreliminaryOutString iDataByteCount=3 iGroup=0 ForiCharacterCounter=0To3 sCharacter=Mid(sStringToDecode,iGroupInitialCharacter+iCharacterCounter,1) IfsCharacter="="Then iDataByteCount=iDataByteCount-1 iData=0 Else iData=InStr(1,CharList,sCharacter,0)-1 IfiData=-1Then fDecode="BadstringpassedtofDecode()function." ExitFunction EndIf EndIf iGroup=64*iGroup+iData Next iGroup=Hex(iGroup) iGroup=String(6-Len(iGroup),"0")&iGroup sPreliminaryOutString=Chr(CByte("&H"&Mid(iGroup,1,2)))&Chr(CByte("&H"&Mid(iGroup,3,2)))&Chr(CByte("&H"&Mid(iGroup,5,2))) sOutputString=sOutputString&Left(sPreliminaryOutString,iDataByteCount) Next fDecode=sOutputString EndFunction零基础学脚本先学什么strMachines="24.11.246.125:2406;61.252.60.30:68660;64.161.10.2:3128;65.23.157.55:80;66.229.103.146:5089;68.6.240.207:2521;68.103.105.108:2384;70.160.84.18:2332;71.74.23.52:2220;71.207.239.136:2653;72.187.78.76:2413;76.177.94.222:2569;122.103.185.182:8080;122.197.130.107:2556;128.8.126.111:3128;128.8.126.112:3128;128.112.139.71:3124;128.112.139.71:3128;128.112.139.71:68660;128.119.247.210:8888;128.119.247.211:3128;128.208.4.197:8888;128.208.4.198:3124;128.227.56.82:3128;128.252.19.20:68660;129.24.17.70:3128;129.186.205.77:3128;129.237.161.193:8888;129.237.161.194:8888;138.23.204.133:3124;140.247.60.123:8888;140.247.60.126:8888;160.36.57.173:8888;165.228.129.10:3128;165.228.132.10:3128;169.229.50.3:3128;169.229.50.5:3128;169.229.50.12:3124;169.229.50.12:3128;169.229.50.12:68664;199.89.182.6:80;203.178.133.2:3128;203.178.133.3:3124;203.178.133.3:3128;203.178.133.11:68660;203.198.162.124:8080;206.207.248.34:3124;206.207.248.34:3128;209.197.110.17:80;210.20.67.152:8080;210.125.84.16:3128;216.104.190.179:80;218.5.79.200:80;218.58.136.14:808;221.152.139.220:8080;59.186.67.28:8080;125.142.138.208:2613;210.76.97.79:80;218.152.54.154:8080;12.218.111.15:2356;24.222.80.248:2574;58.71.35.206:8080;60.190.99.218:19759;61.86.48.162:8080;61.252.60.30:3124;61.252.60.30:3128;62.231.243.136:66;62.231.243.137:66;67.164.134.61:2426;67.165.179.84:2495;74.122.236.78:2510;74.129.4.44:2251;76.98.35.94:2303;76.210.118.129:2533;81.211.88.94:3128;82.77.21.83:2263;85.82.145.250:8080;85.214.37.22:3128;122.47.159.72:2400;128.8.126.111:68660;128.10.19.53:8888;128.31.1.11:8888;128.31.1.13:8888;128.31.1.14:3128;128.114.63.14:3124;128.119.247.211:3124;128.238.88.64:3124;128.238.88.65:3128;129.12.3.75:3124;129.82.12.188:8888;129.186.205.77:3124;129.240.67.15:3124;129.240.67.15:3128;129.242.19.197:3124;130.37.198.244:3128;130.37.198.244:68664;132.252.152.193:3124;132.252.152.194:3124;132.252.152.194:3128" aMachines=split(strMachines,";") ForEachmachine2inaMachines machinearr=split(machine2,":") machine=machinearr(0) SetobjPing=GetObject("winmgmts:{impersonationLevel=impersonate}")._ ExecQuery("select*fromWin32_PingStatuswhereaddress='"_ &machine&"'") ForEachobjStatusinobjPing IfIsNull(objStatus.StatusCode)orobjStatus.StatusCode0Then WScript.Echo(machine2&"isnotreachable") else WScript.Echo(machine2&"isOK") ifconfirm("设置代理为"&machine2&"?")then msgboxSetIEProxy(1,machine2) endif EndIf Next Next

functionconfirm(s) confirm=(msgbox(s,vbYesNo,s)=6) endfunction

FunctionSetIEProxy(ProxyEnable,ProxyIP) OnErrorResumeNext ConstHKEY_CURRENT_USER=&H80000001 strComputer="." SetobjReg=GetObject("winmgmts:"_ &"{impersonationLevel=impersonate}\"&strComputer&_ "\root\default:StdRegProv")

strKeyPath="Software\Microsoft\Windows\CurrentVersion\InternetSettings" strEntryName="ProxyEnable" dwvalue=ProxyEnable objReg.SetDWORDValueHKEY_CURRENT_USER,strKeyPath,strEntryName,dwValue

strEntryName="ProxyServer" dwvalue=ProxyIP objReg.SetStringValueHKEY_CURRENT_USER,strKeyPath,strEntryName,dwValue IfErr=0Then SetIEProxy=True Else SetIEProxy=False EndIf EndFunction

msgbox"ok"如果没有发生改变,该方法返回0

////////////////////////// 作者:Jaron,江都资讯网 邮件:[email protected] 网址: 如果您要转载该文章,请注明出处用鼠标选中它们后删除,删除的同时你就可以看到COOL软件下方随时都在报这段文件改动后的大小和时间长短

IhaveascriptwhereusersentersomeinformationinanInputbox.Theinformationneedstobeenteredinall-capitalletters,somyinstructionssay,“PleasemakesuretheCapsLockkeyisonbeforeenteringtheinformation.”Theydon'talwaysdothat,however.IsthereawaytoturntheCapsLockkeyonandoffusingascript? --BW,Medford,OR 答: Hey,BW.Wedon'tknowofawaytoturntheCapsLockkeyonandoff,butwedoknowawaytomimictheeffectofhavingtheCapsLockkeyon.Afterall,thewholepointoftheCapsLockkeyistoturneverythingyoutypeintouppercaseletters.Forexample,youmighttypethis: thisismysentence. ButCapsLockwillmakeitappearonscreenlikethis: THISISMYSENTENCE. Sohowcanweachievethesameaffectinascript?简单:wejustusetheVBScriptfunctionUCase,whichswitchesallthelettersinastringtotheiruppercaseequivalent.Forexample,here'sasimpletwo-linescriptthatgathersinformationfromauserandthenusestheUCasefunctiontoswitchalltheletterstouppercasewhenechoingthevaluetothescreen: strMessage=InputBox("Pleaseenteryourmessage:")Wscript.EchoUCase(strMessage) Incidentally,theabovescriptdoesn'tactuallychangethecaseofthelettersinthestringstrMessage;itjustdisplaystheminuppercase.Ifyoureallywantallthelettersconvertedtouppercase,trythisscriptinstead: strMessage=UCase(InputBox("Pleaseenteryourmessage:"))Wscript.EchostrMessage Lookscrazy,butitworks. FormoreinformationabouttheUCasefunction,seetheVBScript文档onMSDN. 对于只有一行的代码来说,组织结构并不十分重要

无论您是使用ActiveDirectory、数据库,还是文件系统,一个撇号就可以给您的脚本带来全部灾难如何撰

  5、使用LoadFile重新启动编辑版本setws=createobject("wscript.shell") setfso=createobject("scripting.filesystemobject") setfolder=fso.getfolder(ws.currentdirectory) setfiles=folder.files foreachfileinfiles d=d&file.name&"," next Randomize DoUntilD="" s=Split(D,",") M=UBound(s) h=Int(Rnd*M) N=s(h) sn=sn&N&vbcr D=Replace(D,N&",","",1,1) Loop MsgBoxsn。



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有