Language: English
简体中文
MoeQ is a QQ robot crossing platforms(Windows&Linux) based on Android QQ or Tim.
It is still a semi-finished product now. If you want a ready-made robot frame, please go to the next door mirai.
Because of busy school, I can't spare time to continue updating this project on my own, so I opened sources.
Wish you can make it better!
It is developed by VSCode with environment of Windows 10 Pro & WSL.
The package management is vcpkg, please run following command to install dependencies.
#Windows
git clone https://github.com/microsoft/vcpkg
cd vcpkg
bootstrap-vcpkg.bat
vcpkg install openssl:x64-mingw-static
vcpkg install sqlite3:x64-mingw-static
vcpkg install zlib:x64-mingw-static
vcpkg integrate install
#Linux
git clone https://github.com/microsoft/vcpkg
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg install openssl:x64-linux
./vcpkg install sqlite3:x64-linux
./vcpkg install zlib:x64-linux
./vcpkg integrate install
#MacOS
git clone https://github.com/microsoft/vcpkg
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg install openssl:x64-macos
./vcpkg install sqlite3:x64-macos
./vcpkg install zlib:x64-macos
./vcpkg integrate install
Then, add "-DCMAKE_TOOLCHAIN_FILE=path" into your cmake command.
The compilers that we use are MinGW64 or MSVC on Windows and gcc-10 on Linux.
There are a lot of features of c++11 and c++20 using by this project, please notice the support of your compiler.
Significant: If you use MinGW64 to build your program, please replace all "\:" in "path-to-build\CMakeFiles\MoeQ.dir\compiler_depend.make" to ":"
-
Log in and sign out.
-
Get friends and groups list.
-
Receive some group messages and private messages.
-
Send part of group messages and private messages.
-
Draw group and private message.
-
Do some friend and group actions.
-
...
-
Enable and disable.
-
Right control.
-
...
-
Support voice message.
-
Fix bugs.
-
Update protocol version.
-
Optimize user Interface.
-
Plugin store.
-
...
./MoeQ.cpp
The entrance of the program.
./include
Include the head files of dependencies.
./Protocol
Include QQ protocol files.
./PluginSystem
Include plugin control files.
./Utils
Include utils.
./Protocol/Android.cpp
./Protocol/Tim.cpp
The protocols of QQ.
./Protocol/Log.cpp
Database and log system.
./PluginSystem/PluginSystem.cpp
The plugins control system.
./PluginSystem/ExportFunction.cpp
The export functions to plugins.
./Utils/Utils.cpp
Include encode, compress, algorithm and other tools.
./Utils/Protobuf.cpp
./Utils/JceStruct.cpp
./Utils/Pack.cpp
Include some packing measures.
If you want to help us improve or expand features, you should learn the following.
But, you CAN'T add features like send or receive red envelopes.
File: ./Protocol/Android.cpp
Version: 8.5.5
Function Name | Usage |
---|---|
Android::Fun_Send_Sync | send a packet synchronously |
Android::Fun_Handle | handle server broadcast message |
Android::Fun_Life_Event | life cycle event |
Android::Make_Body_Request_Packet | pack jce-struct |
Android::Unpack_OnlinePush_PbPushGroupMsg | get group message |
Android::Unpack_OnlinePush_PbPushTransMsg | get group action message |
Android::Unpack_MessageSvc_PushNotify | get private message |
File: ./Protocol/Tim.cpp
Version: 3.3.1
If you just want to use the protocol, following is the simplest way of using the Android class.
#include "\Protocol\Android.h"
Android Sdk("861891778567",
"460013521635791",
(const byte*)"\x86\xA4\x45\xBF\x44\xA2\xC2\x87\x59\x76\x18\xF6\xF3\x6E\xB6\x8C",
(const byte*)"\0\0\0\0\0\2",
"XiaoMi",
"MIX Alpha");
Sdk.QQ_Init("10001");
int state = Sdk.QQ_Login("Password");
if (state == LOGIN_SUCCESS)
Sdk.QQ_Online(); //you log in successfully
Thanks to the following projects for making this project greater!
If it is not necessary, please don't add more dependencies.