欢迎来到代码驿站!

VBS

当前位置:首页 > 脚本语言 > VBS

VBS Runas 自动输入密码, 明文

时间:2021-02-15 10:21:08|栏目:VBS|点击:
复制代码 代码如下:

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}"
以上保存为VBS

Runas
只有在通过自动登陆读到密码时才有用

上一篇:VBS常用脚本 好东西

栏    目:VBS

下一篇:VBS教程:方法-Move 方法

本文标题:VBS Runas 自动输入密码, 明文

本文地址:http://www.codeinn.net/misctech/63347.html

推荐教程

广告投放 | 联系我们 | 版权申明

重要申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:914707363 | 邮箱:codeinn#126.com(#换成@)

Copyright © 2020 代码驿站 版权所有