大家使用命令列表(执行 ******) orderlist.txt 时,注意修改 orderlist.txt 里程序的路径,否则提示无法找到系统文件和无法执行。本人的常用程序都安装在D盘,制作orderlist.txt 时程序路径都写D盘,因一时疏忽忘记修改为默认路径就打包了。-
- @echo off&setlocal enabledelayedexpansion
- ::by cjiabing
- ::from http://hi.baidu.com/cjiabing
- title 电脑遥控器 远程批处理cmd@xp
- MODE con: COLS=80 LINES=30
- COLOR 3E
- echo.
- echo.
- echo.
- echo.
- echo.
- echo OE收件箱监控与主题提取工具
- echo OEInboxtool V6.2
- echo.
- echo.
- echo *********************************************************************
- echo ◇本工具基于Outlook Express邮箱程序,用于网络通信;
- echo ◇可提取OE收件箱的标题,但字数和格式受限,不读取信件内容;
- echo ◇若邮件标题是有效的DOS命令本工具将执行该命令;
- echo ◇如发送标题如“shutdown -s -t 0”的邮件将使电脑自动关机;
- echo ◇若发件端为另一PC或Mobile你将可以远程控制该电脑;
- echo ◇因此本工具可以作为一种被动的远程控制的客户端;
- echo ◇专门为批处理设计,如使其充分发挥效用你需懂得DOS命令;
- echo ◇需Outlook Express、base64、blat等第三方工具支持;
- echo ◇需预设Outlook Express邮箱账户并每隔一分钟检查一次新邮件;
- echo ◇本工具为你的生活提供方便和乐趣,请勿用于非法用途。
- echo *********************************************************************
- echo.
- echo 设置选项:
- echo.
- set /p timec= ◇时间(自动循环时间;默认是60,约2分钟):
- if defined timec (goto set) else (set timec=60)
- :set
- echo.&set /p email= ◇模式(是否发送邮件;默认N,聊天Y,外置W):
- if %email%==w (call :mail)
- if %email%==y (call :mail) else (set cmail=echo 不发送邮件)
- :set2
- setlocal enabledelayedexpansion
- set rdm=%random%
- echo set timec=%timec%>>OETool^!rdm^!.bat
- echo set cmail=%cmail%>>OETool^!rdm^!.bat
- echo set email=%email%>>OETool^!rdm^!.bat
- for /f "skip=82 tokens=*" %%a in ('type %0') do echo %%a>>OETool^!rdm^!.bat
- echo start ^"^" batbot001^.bat>>OETool^!rdm^!.bat
- echo ping ^/n 5 127^.0^.1^>nul>>OETool^!rdm^!.bat
- echo goto ^:eof>>OETool^!rdm^!.bat
- echo.&echo 按任意键退出设置并开始执行程序&pause>nul
- start "" OETool^!rdm^!.bat&exit
- :mail
- set cmail=call :send
- set /p recive= 接收邮箱地址(如:987654@163.com):
- set /p sender= 发件邮箱地址(如:123456@qq.com):
- set /p smtp= 发件邮箱SMTP(如:smtp.qq.com):
- set /p pword= 发件邮箱密码(如:123456):
- set /p subj= 邮件标题(如:你好!):
- if not exist body.txt cd.>body.txt
- set /p cont= 邮件内容文本路径(如:C:\body.txt):
- if %email%==w call :send12
- :talk
- echo ^@echo off>>_talk.bat
- echo title 即时通讯>>_talk.bat
- echo if exist talklog^.txt type talklog^.txt>>_talk.bat
- echo echo^.>>_talk.bat
- echo echo 【b-退出;cb-清空发送信息;cb-清空接收信息;cl-清空聊天记录】>>_talk.bat
- echo echo 【b-退出;fb-查看发送信息;ft-查看接收信息;fl-查看聊天记录】>>_talk.bat
- echo echo —————————————————————————————————>>_talk.bat
- echo ^:talk>>_talk.bat
- echo if exist _talk^.txt for ^/f "tokens=*" %%%%a in (_talk^.txt) do echo ^●Itsay^:%%%%a ^&echo ^●Itsay^:%%%%a^>^>talklog^.txt>>_talk.bat
- echo set ^/p talk^= ^○Yousay^:>>_talk.bat
- echo if ^/i %%talk%%^=^=b exit>>_talk.bat
- echo if ^/i %%talk%%^=^=cb cd^.>body^.txt>>_talk.bat
- echo if ^/i %%talk%%^=^=ct cd^.>_talk^.txt>>_talk.bat
- echo if ^/i %%talk%%^=^=cl cd^.>talklog^.txt>>_talk.bat
- echo if ^/i %%talk%%^=^=fb type body^.txt^&echo —————————————————————————————————>>_talk.bat
- echo if ^/i %%talk%%^=^=ft type _talk^.txt^&echo —————————————————————————————————>>_talk.bat
- echo if ^/i %%talk%%^=^=fl type talklog^.txt^&echo —————————————————————————————————>>_talk.bat
- echo echo %%time:~0^,8%%^>^>talklog^.txt>>_talk.bat
- echo echo ^○Yousay^:%%talk%%^>^>talklog^.txt>>_talk.bat
- echo if ^/i not %%talk%%^=^=b if ^/i not %%talk%%^=^=cb if ^/i not %%talk%%^=^=ct if ^/i not %%talk%%^=^=cl if ^/i not %%talk%%^=^=fb if ^/i not %%talk%%^=^=ft if ^/i not %%talk%%^=^=fl echo %%talk%%^>^>body^.txt>>_talk.bat
- echo ping /n 5 127.0.1^>nul>>_talk.bat
- echo exit>>_talk.bat
- goto :eof
- cls
- @echo off&setlocal enabledelayedexpansion
- title OEInboxtool V6.2
- :start
- echo.
- echo.
- echo OEInboxtool V6.2
- echo.
- echo.
- echo *********************************************************************
- echo ◇本工具基于Outlook Express邮箱程序,用于网络通信;
- echo ◇可提取OE收件箱的标题,且字数和格式受限,不识别内容;
- echo ◇若邮件标题是有效的DOS命令本工具将执行该命令;
- echo ◇如发送标题如“shutdown -s -t 0”的邮件将使电脑自动关机;
- echo ◇若发件端为另一PC或Mobile你将可以远程控制该电脑;
- echo ◇因此本工具可以作为一种被动的远程控制的客户端;
- echo ◇专门为批处理设计,如使其充分发挥效用你需懂得DOS命令;
- echo ◇需Outlook Express、base64、blat等第三方工具支持;
- echo ◇预先设置Outlook Express邮箱并每隔一分钟检查一次新邮件;
- echo ◇本工具为你的生活提供方便和乐趣,请勿用于非法用途。
- echo *********************************************************************
- echo.
- echo.
- ping /n 5 127.0.1>nul
- call :try
- set jici=0
- :loop
- set /a jici+=1
- echo.
- echo ——开始第“%jici%”轮任务——
- ping /n ^!timec^! 127.0.1>nul
- echo.
- call :sub
- echo.
- IF errorlevel 0 (echo 【第“%jici%”轮任务完成,将重新开始任务,退出请直接关闭】) else (echo no^!^!)
- echo.
- echo ——————————————————————————————————————
- if exist newitems.txt call :bbot
- if %jici% lss 13 goto loop
- taskkill /f /t /im msimn.exe
- ping /n 10 127.0.1>nul
- goto start
- :try
- echo.
- if exist "%ProgramFiles%\Outlook Express\msimn.exe" start /min "" "%ProgramFiles%\Outlook Express\msimn.exe"
- ping /n 5 127.0.1>nul
- echo ……初始检测……
- echo.
- if not exist "%ProgramFiles%\Outlook Express\msimn.exe" echo 对不起,找不到你的Outlook Express程序!&ping /n 5 127.0.1>nul&exit
- if not exist base64.exe echo 对不起,找不到你的base64.exe程序!&ping /n 5 127.0.1>nul&exit
- for /r "%USERPROFILE%\Local Settings\Application Data\Identities\" %%i in (*) do (
- set dwx=%%~ni
- if ^!dwx^!==收件箱 set sjxm=%%i
- )
- if ^!dwx^!==收件箱 (echo 找到Outlook Express的收件箱!) else (echo 对不起,找不到Outlook Express的收件箱!&&ping /n 5 127.0.1>nul&exit)
-
- IF errorlevel 0 echo ……初始检测……ok
- goto :eof
- ::"%USERPROFILE%\Local Settings\Application Data\Identities\{1C7149FB-17FD-4ED9-B46C-B7C800F767FF}\
- Microsoft\Outlook Express\收件箱.dbx"
- ::C:\Documents and Settings\Administrator\Local Settings\Application Data\Identities\{ECFEDFFB-8EB4-4F0E-827F-1139C49E60D0}\Microsoft\Outlook Express
- :sub
- echo.
- echo ……1、提取邮件……
- if exist newitems.txt type newitems.txt>>Readmessageslog.txt
- if %email%==y cd.>_talk.txt
- if %email%==y if exist newitems.txt echo %time:~0,8%>>_talk.txt&type newitems.txt>>_talk.txt
- del 收件箱.dbx,firstinbox.txt,editinbox.txt,subjectr.txt,newitems.txt>nul 2>nul 1>nul
- if exist "%ProgramFiles%\Outlook Express\msimn.exe" start /min "" "%ProgramFiles%\Outlook Express\msimn.exe"&ping /n 30 127.0.1>nul
- setlocal enabledelayedexpansion
- for /l %%a in (1,2,10000) do (
- set cmt=%%a
- if ^!jici^!==^!cmt^! goto cmt1
- )
- goto cmt2
- :cmt1
- taskkill /f /t /im msimn.exe
- ping /n 15 127.0.1>nul
- move "^!sjxm^!" ^!cd^!
- goto cmt3
- :cmt2
- copy "^!sjxm^!" ^!cd^!
- :cmt3
- ren %cd%\收件箱.dbx firstinbox.txt
- for /f "tokens=*" %%a in ('type firstinbox.txt') do echo %%a>>editinbox.txt
- for /f "tokens=2*" %%a in ('findstr /i /b "Subject" editinbox.txt') do echo %%a %%b>>subjectr.txt
- del firstinbox.txt,editinbox.txt>nul 2>nul 1>nul
- if exist body.txt ^!cmail^!
- if not exist subjectr.txt echo 收件箱没有邮件 &goto :eof
- ::if exist subjectr.txt ^!cmail^!
- cd.>mnewitems.txt
- findstr /v "^=?gbk?B?" subjectr.txt>>mnewitems.txt
- setlocal enabledelayedexpansion
- set numt1=0
- findstr "^=?gbk?B?" subjectr.txt>nul 2>nul 1>nul &IF errorlevel 0 echo ……提取邮件……ok &goto gbkb
- goto :eof
- :gbkb
- echo.
- echo ……2、邮件解码……
- if exist subjectr.txt for /f "tokens=*" %%i in ('findstr "^=?gbk?B?" subjectr.txt') do (
- set /a numt1+=1
- echo ^!numt1^!>nul
- set fjmmd=%%i&echo ^!fjmmd:~8,400^!>subjectrjm1^!numt1^!.txt
- base64 -d -i subjectrjm1^!numt1^!.txt -o subjectrjm2^!numt1^!.txt
- for /f "tokens=*" %%x in (subjectrjm2^!numt1^!.txt) do echo %%x>>mnewitems.txt
- del subjectrjm2^!numt1^!.txt,subjectrjm1^!numt1^!.txt
- )
- IF errorlevel 0 (echo ……邮件解码……ok &goto old) else (echo no^!^!)
- if exist subjectr.txt del subjectr.txt
- goto :eof
- :old
- echo ……3、整理邮件……
- setlocal enabledelayedexpansion
- cd.>newitems.txt
- for /f "delims=" %%a in ('sort mnewitems.txt') do (
- set xav=%%a
- if not ^!xav^! equ ^!vbm^! echo ^!xav^!>>newitems.txt
- set vbm=%%a
- )
- del mnewitems.txt
- IF errorlevel 0 (echo ……整理邮件……ok) else (echo ……整理邮件……no)
- goto :eof
- :send
- start "" _talk.bat
- if %email%==y if not exist body.txt echo 没有邮件内容! &goto :eof
- if exist body.txt for /f %%a in (body.txt) do set kme=%%a
- if not defined kme echo 没有邮件内容! &goto :eof
- echo.
- echo ……4、发送邮件……
- echo 请事先设置一个文本文件,把信件内容写入,再设置路径。你可以使用txt被动发件,也可以通过命令使用bat发件。
- ::call "%ProgramFiles%\WinRAR\RAR.exe" a "%userprofile%\桌面\123456.rar" npslist.txt pslist.txt runn.txt runr.txt
- cd %cd%
- blat -install ^!smtp^! ^!sender^!
- blat ^!cont^! -to ^!recive^! -u ^!sender^! -base64 -charset Gb2312 -pw ^!pword^! -subject ^!subj^!
- ::-attach
- IF errorlevel 0 (echo ……发送邮件……ok&del body.txt>nul) else (echo ……no)
- echo.
- ping /n 5 127.0.1>nul
- goto :eof
- :send12
- if not exist _sendbbot.bat (
- echo blat -install ^!smtp^! ^!sender^!>>_sendbbot.bat
- echo blat ^!cont^! -to ^!recive^! -u ^!sender^! -base64 -charset Gb2312 -pw ^!pword^! -subject ^!subj^!>>_sendbbot.bat
- )
- goto :eof
- :bbot
- echo @echo off>batbot001.bat
- for /f "tokens=*" %%a in (newitems.txt) do echo %%a>>batbot001.bat
- echo cls>>batbot001.bat
- echo echo.>>batbot001.bat
- echo echo.>>batbot001.bat
- echo echo.>>batbot001.bat
- echo echo.>>batbot001.bat
- echo echo ……我是机器人batbot001,命令执行中……>>batbot001.bat
- echo echo.>>batbot001.bat
- echo echo.>>batbot001.bat
- echo echo.>>batbot001.bat
- echo echo 以下是收到的命令和执行的任务:>>batbot001.bat
- echo echo ——————————————————————————————————————>>batbot001.bat
- echo findstr /b /v "[a-zA-Z]" newitems.txt>>batbot001.bat
- echo echo^.>>batbot001.bat
- echo del /f _folist.txt^>nul 2^>nul>>batbot001.bat
- echo for /f "tokens=1,2,*" %%%%a in (batbot001.bat) do if "%%%%a"=="执行" echo %%%%b^&set pvar=%%%%c^&findstr /i /b "%%%%b" orderlist.txt^>^>^_folist.txt^&^&for ^/f "tokens=3*" %%%%i in (_folist.txt) do echo %%%%i %%%%j^>^>batbot001.bat>>batbot001.bat
- echo if defined pvar echo %%pvar%%>>batbot001.bat
- echo.>>batbot001.bat
- echo del /f _folist.txt^>nul 2^>nul>>batbot001.bat
- echo echo ping /n 15 127.0.1^^^>nul^>^>batbot001.bat>>batbot001.bat
- echo echo exit^>^>batbot001.bat>>batbot001.bat
- echo echo.>>batbot001.bat
- start "" batbot001.bat
- ping /n 5 127.0.1>nul
- goto :eof
复制代码 OEInboxtoolV6.2.rar
http://pan.baidu.com/share/link?shareid=3835046253&uk=1124163200 |