```
start qq.exe /start qquin:QQ number pwdhash:Hashed password /stat:40
```
After running the command, the QQ login box pops up, but automatic login is not possible.
I originally thought it was a problem with the QQ version, so I uninstalled the original QQ 2006 Coral虫 and downloaded QQ 2007 BETA 4 from the Tencent official website, but the problem remains.
Hope an expert can give guidance.
=========================================Summary=========================================
Principle and usage method:
```
start "" "C:\Program Files\Tencent\QQ\qq.exe" /start QQUIN:843875648 PWDHASH:4Z1c1a8DeNoF9j+JHHRnrw== /stat:40
```
After testing, currently, this method cannot be used to log in to the latest QQ 2009 Preview 4. It may be that the new version of QQ has not opened this command interface yet, and we can only look forward to the 2009 official version.
Several methods to automatically obtain the QQ path: read the registry, search the entire disk, obtain process information, etc.:
```
@echo off
rem Use WMIC to obtain the QQ path in the process information
for /f "tokens=2 delims==" %%a in ('wmic process where "name='qq.exe'" get executablepath /value') do (
set QQPath=%%a
)
echo %QQPath%
pause
```
```
@echo off
rem Use WMIC to search the entire disk to obtain the QQ path
for /f "skip=1 delims=" %%a in ('wmic datafile where "filename='qq' and extension='exe'" get name') do (
set QQPath=%%a
)
echo %QQPath%
pause
```
```
@echo off
rem Use the reg command to read the registry to obtain the QQ path
for /f "tokens=2*" %%a in ('reg query HKEY_LOCAL_MACHINE\Software\Tencent\QQ /v Install^|findstr "Install"') do (
set QQPath=%%b
)
echo %QQPath%
pause
```
```
@echo off
rem Use the reg export command to export the registry key and then search to obtain the QQ path to avoid the problem that reg query may eat Chinese characters
reg export "HKEY_LOCAL_MACHINE\SOFTWARE\Tencent\QQ" "%temp%\qq.txt">nul
for /f "tokens=2 delims==" %%a in ('type "%temp%\qq.txt"^|findstr /i "Install"') do (
set QQPath=%%~a
)
set QQPath=%QQPath:\\=\%
echo %QQPath%
pause
```
```
@echo off
rem Call VBS to read the registry to obtain the QQ path
>"%temp%\my.vbs" echo Set WshShell = WScript.CreateObject("WScript.Shell")
>>"%temp%\my.vbs" echo WScript.Echo WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Tencent\QQ\Install")
for /f "delims=" %%a in ('cscript /nologo "%temp%\my.vbs"') do (
set QQPath=%%a
)
echo %QQPath%
pause
```
```
@echo off
rem Search the entire disk to obtain the QQ path
set fName=qq.exe
for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
if exist %%a:\nul (
pushd %%a:\
for /r %%b in (*.exe) do (
if /i "%%~nxb" equ "%fName%" (
set fPath=%%b
goto :show
)
)
popd
)
)
:show
echo %fPath%
pause
```
Encrypt the QQ password:
QQ self-service login: How to perform Base64 on the 16 - bit MD5 value itself
http://www.cn-dos.net/forum/viewthread.php?tid=27000
MD5 encryption.hta
http://www.cn-dos.net/forum/viewthread.php?tid=36823
MD5.vbs
http://www.cn-dos.net/forum/viewthread.php?tid=27000&page=2#pid303952
PWDHASH.vbs
http://www.cn-dos.net/forum/viewthread.php?tid=27000&page=2#pid303953
JavaScript source code for QQ password to generate PWDHASH
http://www.cn-dos.net/forum/viewthread.php?tid=29795&page=2#pid194595
[ Last edited by HAT on 2009-1-5 at 23:13 ]
start qq.exe /start qquin:QQ number pwdhash:Hashed password /stat:40
```
After running the command, the QQ login box pops up, but automatic login is not possible.
I originally thought it was a problem with the QQ version, so I uninstalled the original QQ 2006 Coral虫 and downloaded QQ 2007 BETA 4 from the Tencent official website, but the problem remains.
Hope an expert can give guidance.
=========================================Summary=========================================
Principle and usage method:
```
start "" "C:\Program Files\Tencent\QQ\qq.exe" /start QQUIN:843875648 PWDHASH:4Z1c1a8DeNoF9j+JHHRnrw== /stat:40
```
10: Online login
40: Invisible login
41: Online login
QQUIN and PWDHASH must use uppercase letters
Principle: When QQ transmits the password, it first performs an MD5 encryption, then a BASE64 transformation, so that the normal text information can be obtained for network transmission. Find an online MD5 query website (such as http://www.xmd5.org/), enter the plaintext of the QQ password, convert to get the result of MD5 encryption, then find an online BASE64 query website (such as http://www.waishi.net/ip/tools/base64.htm), enter the just-obtained result of MD5 encryption, and convert to get the HASH code.
Using the SendKeys method of VBS to automatically log in, because it cannot guarantee to obtain the correct form, there is a risk, so it is not considered.
After testing, currently, this method cannot be used to log in to the latest QQ 2009 Preview 4. It may be that the new version of QQ has not opened this command interface yet, and we can only look forward to the 2009 official version.
Several methods to automatically obtain the QQ path: read the registry, search the entire disk, obtain process information, etc.:
```
@echo off
rem Use WMIC to obtain the QQ path in the process information
for /f "tokens=2 delims==" %%a in ('wmic process where "name='qq.exe'" get executablepath /value') do (
set QQPath=%%a
)
echo %QQPath%
pause
```
```
@echo off
rem Use WMIC to search the entire disk to obtain the QQ path
for /f "skip=1 delims=" %%a in ('wmic datafile where "filename='qq' and extension='exe'" get name') do (
set QQPath=%%a
)
echo %QQPath%
pause
```
```
@echo off
rem Use the reg command to read the registry to obtain the QQ path
for /f "tokens=2*" %%a in ('reg query HKEY_LOCAL_MACHINE\Software\Tencent\QQ /v Install^|findstr "Install"') do (
set QQPath=%%b
)
echo %QQPath%
pause
```
```
@echo off
rem Use the reg export command to export the registry key and then search to obtain the QQ path to avoid the problem that reg query may eat Chinese characters
reg export "HKEY_LOCAL_MACHINE\SOFTWARE\Tencent\QQ" "%temp%\qq.txt">nul
for /f "tokens=2 delims==" %%a in ('type "%temp%\qq.txt"^|findstr /i "Install"') do (
set QQPath=%%~a
)
set QQPath=%QQPath:\\=\%
echo %QQPath%
pause
```
```
@echo off
rem Call VBS to read the registry to obtain the QQ path
>"%temp%\my.vbs" echo Set WshShell = WScript.CreateObject("WScript.Shell")
>>"%temp%\my.vbs" echo WScript.Echo WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Tencent\QQ\Install")
for /f "delims=" %%a in ('cscript /nologo "%temp%\my.vbs"') do (
set QQPath=%%a
)
echo %QQPath%
pause
```
```
@echo off
rem Search the entire disk to obtain the QQ path
set fName=qq.exe
for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
if exist %%a:\nul (
pushd %%a:\
for /r %%b in (*.exe) do (
if /i "%%~nxb" equ "%fName%" (
set fPath=%%b
goto :show
)
)
popd
)
)
:show
echo %fPath%
pause
```
Encrypt the QQ password:
QQ self-service login: How to perform Base64 on the 16 - bit MD5 value itself
http://www.cn-dos.net/forum/viewthread.php?tid=27000
MD5 encryption.hta
http://www.cn-dos.net/forum/viewthread.php?tid=36823
MD5.vbs
http://www.cn-dos.net/forum/viewthread.php?tid=27000&page=2#pid303952
PWDHASH.vbs
http://www.cn-dos.net/forum/viewthread.php?tid=27000&page=2#pid303953
JavaScript source code for QQ password to generate PWDHASH
http://www.cn-dos.net/forum/viewthread.php?tid=29795&page=2#pid194595
[ Last edited by HAT on 2009-1-5 at 23:13 ]

