start qq.exe /start qquin:QQ号码 pwdhash:HASH加密后的密码 /stat:40
运行命令后,弹出QQ登陆框,但无法自动登陆。
本来以为是QQ版本问题,于是把原来的QQ2006珊瑚虫卸载掉,去腾讯官网下载了QQ2007BETA4,但问题依旧。
望高人指点。
=========================================总结一下=========================================
原理及使用方法:
start "" "C:\Program Files\Tencent\QQ\qq.exe" /start QQUIN:843875648 PWDHASH:4Z1c1a8DeNoF9j+JHHRnrw== /stat:40
10:上线登陆
40:隐身登陆
41:上线登陆
QQUIN和PWDHASH必须使用大写字母
原理:QQ在传输密码的时候,先做一次MD5加密,再做一次BASE64变换,这样可以得到正常的文本信息以便网络传输。找一个MD5在线查询的网站(比如http://www.xmd5.org/),输入QQ密码的明文,转换得到MD5加密的结果,再找一个BASE64在线查询的网站(比如http://www.waishi.net/ip/tools/base64.htm),输入刚才得到的MD5加密的结果,转换得到HASH编码即可。
使用VBS的SendKeys方法自动登录,因无法保证获取正确的交单,存在风险,因此不予考虑。
经测试,目前无法用这个方法登陆最新的QQ2009Preview4,可能是新版的QQ尚未开启这个命令接口吧,只能期待2009正式版了。
自动获取QQ路径的几种方法:读注册表、全盘搜索、获取进程信息等:
@echo off
rem 使用WMIC获取进程信息中的QQ路径
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 使用WMIC全盘搜索获取QQ路径
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 使用reg命令读注册表获取QQ路径
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 使用reg export命令到处注册表项再搜索获取QQ路径以避免reg query可能存在的吃中文字符的问题
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 调用VBS读注册表获取QQ路径
>"%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 全盘搜索获取QQ路径
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
对QQ密码进行加密:
QQ自助登陆:如何对16进制MD5值本身进行Base64
http://www.cn-dos.net/forum/viewthread.php?tid=27000
MD5加密.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
QQ密码生成PWDHASH的JavaScript源代码
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 ]