I've been hanging out on the China DOS Union forum for a while. Then I wanted to make a batch login QQ program and used MD5.EXE from this forum because I needed to encrypt the QQ password. But I encountered a big problem during testing that I couldn't figure out. This problem is really strange. The code should be okay. The issue is that when the program runs to the ": Output to BAT" part, the prepared code isn't fully output to the automatic login.bat, so it can't log in to QQ.
The two parts of the prepared code are as follows:
ECHO echo 当前QQ文件地址是!QQPath!) >>QQ自动登陆.bat
ECHO start "" "!QQPath!" /START QQUIN:%qq% PWDHASH:%encstr% /stat:%zt%) >>QQ自动登陆.bat
That is, the!QQPath! in the two parts of code isn't output to QQ自动登陆.bat. But the ": Output to BAT" part and the ": QQ password encryption" part run without problems when run separately. Why does it have problems when run together??? I'm not smart, please ask the experts for an answer. Thanks a lot!!!!!
Uploaded for everyone to see Batch login QQ making program
All code:
:qq
@echo off
MODE con COLS=50 LINES=20
title 批处理登陆QQ
color 1f
cls
echo. ╭─────────╮
echo. ╭───┤ 选择如下操作 ├───╮
echo. │ ╰─────────╯ │
echo │ 批处理登陆QQ │
echo. ╰─────────────────╯
pause
cls
echo.
echo. 批处理登陆QQ,方便快捷
echo. 省去输入账号和密码的麻烦(不支持QQ2009)
echo. 而且百分百防盗!
echo.
echo. 按任意键继续!
pause>nul
cls
set qq=
set /p qq=请输入QQ号码(Enter确认):
cls
:QQ密码加密
@echo off
setlocal enabledelayedexpansion
set B64CODE=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
set/p str=请输入QQ密码(Enter确认)::
for /f %%i in ('md5 -d%str%') do set "strhex=%%i"
:encloop
if not defined strhex goto :encbreak
set chr1=0x!strhex:~0,2!
set chr2=0x!strhex:~2,2!
set chr3=0x!strhex:~4,2!
set strhex=%strhex:~6%
for %%i in (chr1 chr2 chr3) do if "!%%i!"=="0x" set %%i=0
set/a enc1=%chr1%">>"2
set/a enc2=((%chr1%"&"3)"<<"4)"|"(%chr2%">>"4)
set/a enc3=((%chr2%"&"15)"<<"2)"|"(%chr3%">>"6)
set/a enc4=%chr3%"&"63
if %chr3% equ 0 if %chr2% equ 0 (set enc4=64& set enc3=64) else (set enc4=64)
set encstr=!encstr!!B64CODE:~%enc1%,1!!B64CODE:~%enc2%,1!!B64CODE:~%enc3%,1!!B64CODE:~%enc4%,1!
goto :encloop
:encbreak
echo 转换后的QQ密码为: %encstr%
cls
echo.输入40为隐身 41为不隐身!
set zt=
set /p zt=是否?(Enter确认):
cls
:输出到BAT
cls
ECHO @ECHO OFF^&SETLOCAL ENABLEDELAYEDEXPANSION >QQ自动登陆.bat
ECHO for /f "tokens=1,2,*" %%%%i in ('REG QUERY "HKLM\SOFTWARE\TENCENT\PLATFORM_TYPE_LIST\1" ^^^| FIND /I "TypePath"') DO ( >>QQ自动登陆.bat
ECHO SET QQPath=%%%%k >>QQ自动登陆.bat
:fggf
ECHO echo 当前QQ文件地址是!QQPath!) >>QQ自动登陆.bat
ECHO start "" "!QQPath!" /START QQUIN:%qq% PWDHASH:%encstr% /stat:%zt%) >>QQ自动登陆.bat
ECHO exit >>QQ自动登陆.bat
move QQ自动登陆.bat QQ%qq%自动登陆器.bat
cls
echo.成功在本目录下生成QQ号码为%qq%的自动登陆器
echo.
echo.按任意键登陆QQ%qq% !
pause>nul&start QQ%qq%自动登陆器.bat&goto qq
[ Last edited by wuji1234 on 2009-7-14 at 08:14 ]
The two parts of the prepared code are as follows:
ECHO echo 当前QQ文件地址是!QQPath!) >>QQ自动登陆.bat
ECHO start "" "!QQPath!" /START QQUIN:%qq% PWDHASH:%encstr% /stat:%zt%) >>QQ自动登陆.bat
That is, the!QQPath! in the two parts of code isn't output to QQ自动登陆.bat. But the ": Output to BAT" part and the ": QQ password encryption" part run without problems when run separately. Why does it have problems when run together??? I'm not smart, please ask the experts for an answer. Thanks a lot!!!!!
Uploaded for everyone to see Batch login QQ making program
All code:
@echo off
MODE con COLS=50 LINES=20
title 批处理登陆QQ
color 1f
cls
echo. ╭─────────╮
echo. ╭───┤ 选择如下操作 ├───╮
echo. │ ╰─────────╯ │
echo │ 批处理登陆QQ │
echo. ╰─────────────────╯
pause
cls
echo.
echo. 批处理登陆QQ,方便快捷
echo. 省去输入账号和密码的麻烦(不支持QQ2009)
echo. 而且百分百防盗!
echo.
echo. 按任意键继续!
pause>nul
cls
set qq=
set /p qq=请输入QQ号码(Enter确认):
cls
:QQ密码加密
@echo off
setlocal enabledelayedexpansion
set B64CODE=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
set/p str=请输入QQ密码(Enter确认)::
for /f %%i in ('md5 -d%str%') do set "strhex=%%i"
:encloop
if not defined strhex goto :encbreak
set chr1=0x!strhex:~0,2!
set chr2=0x!strhex:~2,2!
set chr3=0x!strhex:~4,2!
set strhex=%strhex:~6%
for %%i in (chr1 chr2 chr3) do if "!%%i!"=="0x" set %%i=0
set/a enc1=%chr1%">>"2
set/a enc2=((%chr1%"&"3)"<<"4)"|"(%chr2%">>"4)
set/a enc3=((%chr2%"&"15)"<<"2)"|"(%chr3%">>"6)
set/a enc4=%chr3%"&"63
if %chr3% equ 0 if %chr2% equ 0 (set enc4=64& set enc3=64) else (set enc4=64)
set encstr=!encstr!!B64CODE:~%enc1%,1!!B64CODE:~%enc2%,1!!B64CODE:~%enc3%,1!!B64CODE:~%enc4%,1!
goto :encloop
:encbreak
echo 转换后的QQ密码为: %encstr%
cls
echo.输入40为隐身 41为不隐身!
set zt=
set /p zt=是否?(Enter确认):
cls
:输出到BAT
cls
ECHO @ECHO OFF^&SETLOCAL ENABLEDELAYEDEXPANSION >QQ自动登陆.bat
ECHO for /f "tokens=1,2,*" %%%%i in ('REG QUERY "HKLM\SOFTWARE\TENCENT\PLATFORM_TYPE_LIST\1" ^^^| FIND /I "TypePath"') DO ( >>QQ自动登陆.bat
ECHO SET QQPath=%%%%k >>QQ自动登陆.bat
:fggf
ECHO echo 当前QQ文件地址是!QQPath!) >>QQ自动登陆.bat
ECHO start "" "!QQPath!" /START QQUIN:%qq% PWDHASH:%encstr% /stat:%zt%) >>QQ自动登陆.bat
ECHO exit >>QQ自动登陆.bat
move QQ自动登陆.bat QQ%qq%自动登陆器.bat
cls
echo.成功在本目录下生成QQ号码为%qq%的自动登陆器
echo.
echo.按任意键登陆QQ%qq% !
pause>nul&start QQ%qq%自动登陆器.bat&goto qq
[ Last edited by wuji1234 on 2009-7-14 at 08:14 ]
