手机
当前位置:查字典教程网 >脚本专栏 >vbs >VBS Runas 自动输入密码, 明文
VBS Runas 自动输入密码, 明文
摘要:复制代码代码如下:SetShell=CreateObject("WScript.Shell")Shell.Run"cmd/c@runas/u...

复制代码 代码如下:

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%system32cmd.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

%3runas.vbs

以上保存为BAT

复制代码 代码如下:

dim WshShell,cmd

cmd="%SystemRoot%system32cmd.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 Runas 自动输入密码, 明文】相关文章:

VBS教程:正则表达式简介 -选择与编组

VBS利用SendKeys输入中文字符的方法

VBS MD5加密算法代码

VBS 断网后自动关机30秒后

用VBScript制作QQ自动登录的脚本代码

VBS 硬盘读写统计(分区读写统计)

VBS创建正则表达式对象的两种方法

VBS中常用脚本代码

vbscript自动配置IIS的代码

vbs自动填表单分析附源码

精品推荐
分类导航