diff --git a/.github/ISSUE_TEMPLATE/-------.md b/.github/ISSUE_TEMPLATE/-------.md index 2a5f928ad..ea75d6361 100644 --- a/.github/ISSUE_TEMPLATE/-------.md +++ b/.github/ISSUE_TEMPLATE/-------.md @@ -12,11 +12,7 @@ assignees: '' - 我已经对照 CHANGELOG ,相关问题未在近期更新中解决 - 我已经搜索了已有的 Issues 列表中有没相关的信息 - 我已经阅读了 Mirai 的相关文档 - - 修改下方列表,在完成事项前写[x] --> -- [ ] 我已经对照 CHANGELOG ,相关问题未在近期更新中解决 -- [ ] 我已经搜索了已有的 Issues 列表中有没相关的信息 -- [ ] 我已经阅读了 Mirai 的相关文档 - + diff --git a/.github/ISSUE_TEMPLATE/----.md b/.github/ISSUE_TEMPLATE/----.md index 6d28ee1a7..4acb2f6e0 100644 --- a/.github/ISSUE_TEMPLATE/----.md +++ b/.github/ISSUE_TEMPLATE/----.md @@ -12,19 +12,10 @@ assignees: '' - 我已经对照 CHANGELOG ,相关问题未在近期更新中解决 - 我已经搜索了已有的 Issues 列表中有没相关的信息 - 我已经阅读了 Mirai 的相关文档 - - 修改下方列表,在完成事项前写[x] --> -- [ ] 我已经对照 CHANGELOG ,相关问题未在近期更新中解决 -- [ ] 我已经搜索了已有的 Issues 列表中有没相关的信息 -- [ ] 我已经阅读了 Mirai 的相关文档 - + diff --git a/.github/ISSUE_TEMPLATE/bug---.md b/.github/ISSUE_TEMPLATE/bug---.md index 05dcb8364..ca656d91d 100644 --- a/.github/ISSUE_TEMPLATE/bug---.md +++ b/.github/ISSUE_TEMPLATE/bug---.md @@ -12,14 +12,8 @@ assignees: '' - 我已经对照 CHANGELOG ,相关问题未在近期更新中解决 - 我已经搜索了已有的 Issues 列表中有没相关的信息 - 我已经阅读了 Mirai 的相关文档 - - 修改下方列表,在完成事项前写[x] --> -- [ ] 我已经对照 CHANGELOG ,相关问题未在近期更新中解决 -- [ ] 我已经搜索了已有的 Issues 列表中有没相关的信息 -- [ ] 我已经阅读了 Mirai 的相关文档 - - diff --git a/README.md b/README.md index f948330fd..b9b2172a6 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ mirai 是一个在全平台下运行,提供 QQ Android 协议支持的高效 #### 不会支持的协议 - 金钱相关,如点赞、收付款 - 敏感操作,如主动添加好友、主动加入群、主动邀请好友加群 +- 安全相关,获取账号登录凭证(token,cookie等) **一切开发旨在学习,请勿用于非法用途** @@ -140,7 +141,7 @@ Demos: [mirai-demos](https://github.com/mamoe/mirai-demos) #### 从其他平台迁移 - 酷Q的插件可以在 mirai 中加载,详见 [mirai-Native](https://github.com/iTXTech/mirai-native) -- 使用 `酷Q HTTP API` 的插件将可以在 mirai 中加载,`mirai-CQ-Adapter` 正在进行中 +- 使用 `酷Q HTTP API` 的插件将可以在 mirai 中通过`CQHTTP Mirai`加载,详见 [cqhttp-mirai](https://github.com/yyuueexxiinngg/cqhttp-mirai) ## [贡献](CONTRIBUTING.md) diff --git a/gradle/bintray.gradle b/gradle/bintray.gradle index 8a73daf7a..346e5b100 100644 --- a/gradle/bintray.gradle +++ b/gradle/bintray.gradle @@ -1,7 +1,7 @@ publishing { repositories { maven { - url = "https://api.bintray.com/maven/mamoe/mirai/mirai-core/;publish=0" + url = "https://api.bintray.com/maven/him188moe/mirai/mirai-core/;publish=0" credentials { username = upload.Bintray.getUser(project) diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/contact/FriendImpl.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/contact/FriendImpl.kt index 418678648..ee15bf260 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/contact/FriendImpl.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/contact/FriendImpl.kt @@ -33,6 +33,7 @@ import net.mamoe.mirai.event.events.ImageUploadEvent import net.mamoe.mirai.message.MessageReceipt import net.mamoe.mirai.message.data.Image import net.mamoe.mirai.message.data.Message +import net.mamoe.mirai.message.data.OfflineFriendImage import net.mamoe.mirai.message.data.isContentNotEmpty import net.mamoe.mirai.qqandroid.QQAndroidBot import net.mamoe.mirai.qqandroid.network.highway.postImage diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/Tlv.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/Tlv.kt index 35d69d447..f90c36760 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/Tlv.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/Tlv.kt @@ -85,7 +85,7 @@ internal fun BytePacketBuilder.t106( subAppId: Long, appClientVersion: Int = 0, uin: Long, - n5_always_1: Int = 1, + isSavePassword: Boolean = true, passwordMd5: ByteArray, salt: Long, uinAccountString: ByteArray, @@ -115,7 +115,7 @@ internal fun BytePacketBuilder.t106( writeInt(currentTimeMillis.toInt()) writeFully(ByteArray(4)) // ip // no need to write actual ip - writeByte(n5_always_1.toByte()) + writeByte(isSavePassword.toByte()) writeFully(passwordMd5) writeFully(tgtgtKey) writeInt(0) @@ -174,16 +174,16 @@ internal fun BytePacketBuilder.t100( internal fun BytePacketBuilder.t107( picType: Int, - const1_always_0: Int = 0, - const2_always_0: Int = 0, - const3_always_1: Int = 1 + capType: Int = 0, + picSize: Int = 0, + retType: Int = 1 ) { writeShort(0x107) writeShortLVPacket { writeShort(picType.toShort()) - writeByte(const1_always_0.toByte()) - writeShort(const2_always_0.toShort()) - writeByte(const3_always_1.toByte()) + writeByte(capType.toByte()) + writeShort(picSize.toShort()) + writeByte(retType.toByte()) } shouldEqualsTo 6 } @@ -352,7 +352,7 @@ internal fun BytePacketBuilder.t124( osVersion: ByteArray, // Build.VERSION.RELEASE.toByteArray() networkType: NetworkType, //oicq.wlogin_sdk.tools.util#get_network_type simInfo: ByteArray, // oicq.wlogin_sdk.tools.util#get_sim_operator_name - unknown: ByteArray, + address: ByteArray, // always new byte[0] apn: ByteArray = "wifi".toByteArray() // oicq.wlogin_sdk.tools.util#get_apn_string ) { writeShort(0x124) @@ -361,7 +361,7 @@ internal fun BytePacketBuilder.t124( writeShortLVByteArrayLimitedLength(osVersion, 16) writeShort(networkType.value.toShort()) writeShortLVByteArrayLimitedLength(simInfo, 16) - writeShortLVByteArrayLimitedLength(unknown, 32) + writeShortLVByteArrayLimitedLength(address, 32) writeShortLVByteArrayLimitedLength(apn, 16) } } @@ -637,14 +637,14 @@ internal fun BytePacketBuilder.t202( } internal fun BytePacketBuilder.t177( - unknown1: Long = 1571193922L, - unknown2: String = "6.0.0.2413" + buildTime: Long = 1571193922L, // wtLogin BuildTime + BuildVersion: String = "6.0.0.2413" // wtLogin SDK Version ) { writeShort(0x177) writeShortLVPacket { writeByte(1) - writeInt(unknown1.toInt()) - writeShortLVString(unknown2) + writeInt(buildTime.toInt()) + writeShortLVString(BuildVersion) } shouldEqualsTo 0x11 } diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/WtLogin.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/WtLogin.kt index d1c376a30..b33228313 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/WtLogin.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/WtLogin.kt @@ -137,7 +137,7 @@ internal class WtLogin { client.subAppId /* maybe 1*/, client.appClientVersion, client.uin, - 1, + true, client.account.passwordMd5, 0, client.uin.toByteArray(),