首页 电脑 电脑学堂 查看内容

终端监视脚本

2009-10-26 09:50 791 1

摘要: 转自icehack原创NP在你登陆终端以后在cmd下运行cmd-xx.vbs就可以不需要cscript xx.vbs当管理员登陆前,产生了终端线程就注销   程序代码 On err...
关键词: nbsp oRegExp wscript oExec Matches oShell strOut NothingSet Num 终端

转自icehack原创NP在你登陆终端以后在cmd下运行cmd-xx.vbs就可以不需要cscript xx.vbs当管理员登陆前,产生了终端线程就注销   程序代码 On error resume nextif (lcase(right(wscript.fullname,11))="wscript.exe") thenwscript.echo "Execute it under the cmd.exe Plz! Thx."wscript.quitend if"code by netpatchFunction begin()Dim oShell,oExec,strOut,oRegExp,Matches,Match,Num,TportSet oShell = WScript.CreateObject("WScript.Shell")Set oExec = oShell.Exec("netstat -an")Set oregExp = new RegExporegExp.Pattern = "TCP[\s]+[\d\.]+:3389[\s]+[\d\.]+:[\d]+[\s]+ESTABLISHED"oregExp.IgnoreCase = TrueoregExp.Global = TrueDo While Not oExec.StdOut.AtEndOfStream    strOut = strOut & oExec.StdOut.ReadLine() & Chr(13) & Chr(10)LoopSet Matches = oregExp.Execute(strOut)Num = 0For Each Match In Matches    Num = Num + 1Nextif num > 1 then Runs=trueoShell.run "logoff"end ifSet Matches = NothingSet oregExp = NothingSet oExec = NothingSet oShell = Nothingend functionWhile runs=falsebegin()Wend
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

返回顶部