发送c:\a.txt 文本内容,试试看吧:- @echo off
- del temp.vbs
- (
- echo on error resume next
- echo dim WshShell,fso,str
- echo set fso = createobject^("scripting.filesystemobject"^)
- echo str = fso.opentextfile^("c:\a.txt"^).readall
- echo Set WshShell = WScript.CreateObject^("WScript.Shell"^)
- echo WshShell.run"cmd"
- echo WshShell.AppActivate"c:\windows\system32\cmd.exe"
- echo WScript.Sleep 200
- echo WshShell.SendKeys"telnet smtp.163.com 25{ENTER}"
- echo WScript.Sleep 200
- echo WshShell.SendKeys"helo localhost{ENTER}"
- echo WScript.Sleep 200
- echo WshShell.SendKeys"auth login{ENTER}"
- echo WScript.Sleep 200
- echo WshShell.SendKeys"name{ENTER}" 'base64加密后的用户名
- echo WScript.Sleep 200
- echo WshShell.SendKeys"password{ENTER}" 'base64加密后的密码
- echo WScript.Sleep 200
- echo WshShell.SendKeys"mail from : <xxx@163.com>{ENTER}"
- echo WScript.Sleep 200
- echo WshShell.SendKeys"rcpt to : <xxx@qq.com>{ENTER}"
- echo WScript.Sleep 200
- echo WshShell.SendKeys"data{ENTER}"
- echo WScript.Sleep 200
- echo WshShell.SendKeys"subject : test{ENTER}{ENTER}"
- echo WScript.Sleep 200
- echo WshShell.SendKeys str ^& "{ENTER}"
- echo WshShell.SendKeys".{ENTER}"
- )>temp.vbs
- call temp.vbs
复制代码
|