VBS Runas 自动输入密码, 明文
作者 佚名
来源 ASP编程
浏览
发布时间 2013-07-09
复制代码 代码如下: Set Shell = CreateObject("WScript.Shell") Shell.Run "cmd /c @runas /user:administrator CMD" WScript.Sleep 2000 Shell.SendKeys "password{ENTER}exit{ENTER}" WScript.Sleep 1000 Shell.SendKeys "@echo off&cls&net stop messenger&net start messenger&exit{ENTER}" @echo off echo dim WshShell,cmd >> %3runas.vbs echo cmd="%SystemRoot%\system32\cmd.exe" >> %3runas.vbs echo Set WshShell=WScript.CreateObject("WScript.Shell") >> %3runas.vbs echo WshShell.Run cmd >> %3runas.vbs echo WScript.Sleep 500 >> %3runas.vbs echo WshShell.SendKeys"runas /user:Administrators\%1 %3Bcmd.bat" >> %3runas.vbs echo WshShell.SendKeys"{ENTER}" >> %3runas.vbs echo WScript.Sleep 1000 >> %3runas.vbs echo WshShell.SendKeys"%2" >> %3runas.vbs echo WshShell.SendKeys"{ENTER}" >> %3runas.vbs echo WScript.Sleep 500 >> %3runas.vbs echo WshShell.SendKeys"exit" >> %3runas.vbs echo WshShell.SendKeys"{ENTER}" >> %3runas.vbs echo @echo off >> %3Bcmd.bat echo %4 %5 %6 %7 %8 %9 >> %3Bcmd.bat echo del %3runas.vbs >> %3Bcmd.bat echo del %3Bcmd.bat >> %3Bcmd.bat %3\runas.vbs 以上保存为BAT 复制代码 代码如下: dim WshShell,cmd cmd="%SystemRoot%\system32\cmd.exe" Set WshShell=WScript.CreateObject("WScript.Shell") WshShell.Run cmd WScript.Sleep 500 WshShell.SendKeys"runas /user:Administrators\用户名 密码 命令" WshShell.SendKeys"{ENTER}" WScript.Sleep 1000 WshShell.SendKeys"%2" WshShell.SendKeys"{ENTER}" WScript.Sleep 500 WshShell.SendKeys"exit" WshShell.SendKeys"{ENTER}" Runas 只有在通过自动登陆读到密码时才有用 |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于VBS Runas 自动输入密码, 明文的所有评论