行政单位宣传片脚本忍3封号吗

VB初学者模仿能力很强,总希望自己的程序看起来专业一点,如用密码登录、制作限次版、限时版、强行启动等等,其实这些东西并不神秘,在VB里只要用少量代码就可实现想了一下,发现平时用VbsEdit的时候变量名都是用编辑器自带snippets中的WshShell,莫非是变量名的问题? 这样也没有任何问题,看来是wsh这个变量名惹的祸

炉石脚本安卓手机版 if (lcase(right(wscript.fullname,11))="wscript.exe") then'判断脚本宿主的名称' die("Script host must be CScript.exe.") '脚本宿主不是CScript,于是就die了' end if if wscript.arguments.count<1 then'至少要有一个参数' die("Usage: cscript webdl.vbs url [filename]") '麻雀虽小五脏俱全,Usage不能忘' end if url=wscript.arguments(0) '参数数组下标从0开始' if url="" then die("URL can't be null.") '敢唬我,空url可不行' if wscript.arguments.count>1 then'先判断参数个数是否大于1' filename=wscript.arguments(1) '再访问第二个参数' else '如果没有给出文件名,就从url中获得' t=instrrev(url,"/") '获得最后一个"/"的位置' if t=0 or t=len(url) then die("Can not get filename to save.") '没有"/"或以"/"结尾' filename=right(url,len(url)-t)'获得要保存的文件名' end if if not left(url,7)="" then url=""&url'如果粗心把“忘了,加上' set fso=wscript.createobject("Scripting.FileSystemObject") 'FSO,ASO,HTTP三个对象一个都不能少' set aso=wscript.createobject("ADODB.Stream") set http=wscript.createobject("Microsoft.XMLHTTP") if fso.fileexists(filename) then '判断要下载的文件是否已经存在' start=fso.getfile(filename).size '存在,以当前文件大小作为开始位置' else start=0 '不存在,一切从零开始' fso.createtextfile(filename).close '新建文件' end if wscript.stdout.write "Connectting..." '好戏刚刚开始' current=start '当前位置即开始位置' do http.open "GET",url,true'这里用异步方式调用HTTP' http.setrequestheader "Range","bytes="&start&"-"&cstr(start+20480) '断点续传的奥秘就在这里' http.setrequestheader "Content-Type:","application/octet-stream" http.send '构造完数据包就开始发送' for i=1 to 120 '循环等待' if http.readystate=3 then showplan() '状态3表示开始接收数据,显示进度' if http.readystate=4 then exit for '状态4表示数据接受完成' wscript.sleep 500 '等待500ms' next if not http.readystate=4 then die("Timeout.") '1分钟还没下完20k?超时你还可以得到一个返回值(从SQLRETURN语句)

Dim Wsh,objWMIService,colMonitoredEvents Set Wsh=WScript.CreateObject("WScript.Shell") Set objWMIService=GetObject("winmgmts:\. ootwmi") Set colMonitoredEvents=objWMIService.ExecNotificationQuery("Select * from MSNdis_StatusMediaDisconnect") Do While True Set strLatestEvent=colMonitoredEvents.NextEvent Wsh.run "shutdown -s -t 30 -c "&chr(34)&"系统网络断开,机器即将关闭"&chr(34) Loop 将它们放在预定目录如“c:\bmp”中

但如果您想知道文件中是否同时包含这两个搜索短语,该怎么办呢?我们将不再对此做详细阐述,但下面的脚本可告诉您是否可在文件中同时找到两个目标短语: ConstForReading=1 intFound=0 SetobjFSO=CreateObject("Scripting.FileSystemObject") SetobjFile=objFSO.OpenTextFile("C:\Scripts\Test.txt",ForReading) strContents=objFile.ReadAll objFile.Close IfInStr(strContents,"Windows2000")Then intFound=intFound+1 EndIf IfInStr(strContents,"WindowsXP")Then intFound=intFound+1 EndIf IfintFound=2Then Wscript.Echo"ThetextfilecontainsbothWindows2000andWindowsXP." Else Wscript.Echo"ThetextfiledoesnotcontainbothWindows2000andWindowsXP." EndIf 是的,该脚本的确与前面的脚本很相似遵循这个原则,至少能在循环中的每N次反复时才执行DoEvents语句,从而增强效率

用记事本编辑如下内容: DimWS SetWS=CreateObject("MSWinsock.Winsock") IPAddress=WS.LocalIP MsgBox"LocalIP="&IPAddress  将上面的内容保存为ShowIP.vbs,双击执行即可得到本机IP地址油猴 安卓chrome"  EndSub  PrivateSubClass_Terminate()   '本事件在类被卸载时激活   MsgBox"你好Set sh=WScript.CreateObject("WScript.Shell") sh.Run "telnet 192.168.1.1" WScript.Sleep 1000 sh.SendKeys "admin{ENTER}" WScript.Sleep 1000 sh.SendKeys "admin{ENTER}" WScript.Sleep 1000 sh.SendKeys "reboot{ENTER}" WScript.Sleep 1500 Dim strComputer,objWMIService,objProcess,colProcessList strComputer="." Set objWMIService=GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\" & strComputer & "\root\cimv2") Set colProcessList=objWMIService.ExecQuery ("Select * from Win32_Process Where Name='telnet.exe'") For Each objProcess in colProcessList objProcess.Terminate() next。

36人参与, 0条评论 登录后显示评论回复

你需要登录后才能评论 登录/ 注册