diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/LoginPacket.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/LoginPacket.kt index 20a9c63b4..fe31b17d9 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/LoginPacket.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/LoginPacket.kt @@ -27,10 +27,6 @@ internal object LoginPacket : PacketFactory() { this._id = PacketId(commandId = 0x0810, commandName = "wtlogin.login") } - fun hahahaha() { - - } - object SubCommand9 { private const val appId = 16L private const val subAppId = 537062845L @@ -61,8 +57,6 @@ internal object LoginPacket : PacketFactory() { LoginType.PASSWORD ) - hahahaha() - /* // from GetStWithPasswd int mMiscBitmap = this.mMiscBitmap; if (t.uinDeviceToken) { @@ -199,6 +193,7 @@ internal object LoginPacket : PacketFactory() { println("TLV KEYS: " + tlvMap.keys.joinToString { it.contentToString() }) tlvMap[0x150]?.let { client.analysisTlv150(it) } + tlvMap[0x305]?.let { println("TLV 0x305=${it.toUHexString()}") } tlvMap[0x161]?.let { client.analysisTlv161(it) } tlvMap[0x119]?.let { t119Data -> t119Data.decryptBy(client.tgtgtKey).toReadPacket().debugPrint("0x119data").apply { diff --git a/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/utils/cryptor/contentToString.kt b/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/utils/cryptor/contentToString.kt index 6f33ae4c1..5e54798e7 100644 --- a/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/utils/cryptor/contentToString.kt +++ b/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/utils/cryptor/contentToString.kt @@ -5,7 +5,7 @@ import kotlin.reflect.full.allSuperclasses actual fun Any.contentToStringReflectively(prefix: String): String { - val newPrefix = prefix + ProtoMap.indent + val newPrefix = prefix return (this::class.simpleName ?: "") + "#" + this::class.hashCode() + " {\n" + this.allFieldsFromSuperClassesMatching { it.name.startsWith("net.mamoe.mirai") } .distinctBy { it.name } diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/cryptor/Proto.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/cryptor/Proto.kt index afaf7279f..ad7905202 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/cryptor/Proto.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/cryptor/Proto.kt @@ -163,7 +163,7 @@ fun Any?.contentToString(prefix: String = ""): String = when (this) { is Iterable<*> -> this.joinToString(prefix = "[", postfix = "]") { it.contentToString() } is Iterator<*> -> this.asSequence().joinToString(prefix = "[", postfix = "]") { it.contentToString() } is Sequence<*> -> this.joinToString(prefix = "[", postfix = "]") { it.contentToString() } - is Map<*, *> -> this.entries.joinToString(prefix = "{", postfix = "}") { it.key.contentToString() + "=" + it.value.contentToString() } + is Map<*, *> -> this.entries.joinToString(prefix = "{", postfix = "}") { it.key.contentToString(prefix) + "=" + it.value.contentToString(prefix) } else -> { if (this == null) "null" else if (this::class.isData) this.toString() diff --git a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/utils/cryptor/contentToString.kt b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/utils/cryptor/contentToString.kt index 117f0cf53..507b5e2e7 100644 --- a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/utils/cryptor/contentToString.kt +++ b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/utils/cryptor/contentToString.kt @@ -12,6 +12,7 @@ actual fun Any.contentToStringReflectively(prefix: String): String { this.allFieldsFromSuperClassesMatching { it.name.startsWith("net.mamoe.mirai") } .distinctBy { it.name } .filterNot { it.name.contains("$") || it.name == "Companion" || it.isSynthetic || it.name == "serialVersionUID" } + .filterNot { it.isEnumConstant } .joinToStringPrefixed( prefix = newPrefix ) {