VBS 路由重启脚本
程序员文章站
2022-07-04 20:33:24
复制代码 代码如下:set sh=wscript.createobject("wscript.shell") sh.run "telnet 192.168.1.1" wsc...
复制代码 代码如下:
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
上一篇: 伸手向我示好