回复 3# kknd
不知道vbs如何转义,给一个笨方法。
- @echo off
- set "ip=192.168.1.12"
- set "name=root"
- set "pw=3edc%%^^^^4"
- echo %pw%|clip
- >%tmp%\\run.vbs echo dim program
- >>%tmp%\\run.vbs echo program="D:\Program Files (x86)\Client.exe"
- >>%tmp%\\run.vbs echo set Wshell=CreateObject("Wscript.Shell")
- >>%tmp%\\run.vbs echo set oexec=Wshell.Exec(program)
- >>%tmp%\\run.vbs echo wscript.Sleep 1000
- >>%tmp%\\run.vbs echo Wshell.SendKeys"%name%"
- >>%tmp%\\run.vbs echo Wshell.SendKeys"{TAB}"
- >>%tmp%\\run.vbs echo Wshell.SendKeys"^v"
- >>%tmp%\\run.vbs echo Wshell.SendKeys"{TAB}""{TAB}""{TAB}""{TAB}"
- >>%tmp%\\run.vbs echo Wshell.SendKeys"%ip%"
- >>%tmp%\\run.vbs echo Wshell.SendKeys"{ENTER}"
- %tmp%\\run.vbs
- del /q %tmp%\\run.vbs
复制代码
|