diff --git a/debuggui.cmd b/debuggui.cmd new file mode 100644 index 000000000..7bb235044 --- /dev/null +++ b/debuggui.cmd @@ -0,0 +1 @@ +gradle :mirai-debug:run \ No newline at end of file diff --git a/mirai-debug/src/main/kotlin/HexDebuggerGui.kt b/mirai-debug/src/main/kotlin/HexDebuggerGui.kt index 3679ee212..8b44da638 100644 --- a/mirai-debug/src/main/kotlin/HexDebuggerGui.kt +++ b/mirai-debug/src/main/kotlin/HexDebuggerGui.kt @@ -76,7 +76,7 @@ class HexDebuggerGui : View("s") { private lateinit var outUVarInt: TextField private lateinit var outShort: TextField private lateinit var outUInt: TextField - private lateinit var outString: TextField + private lateinit var outString: TextArea private val clip = Toolkit.getDefaultToolkit().systemClipboard @@ -195,7 +195,8 @@ class HexDebuggerGui : View("s") { } vbox(10) { - alignment = Pos.CENTER_RIGHT + paddingTop = 10 + alignment = Pos.TOP_RIGHT label("size") label("UVarInt") label("short") @@ -229,9 +230,11 @@ class HexDebuggerGui : View("s") { isEditable = false } - outString = textfield { + outString = textarea { promptText = "String" isEditable = false + maxWidth = 100.0 + minHeight = 30.0 } children.filterIsInstance().forEach { diff --git a/mirai-debug/src/main/kotlin/PacketDebuger.kt b/mirai-debug/src/main/kotlin/PacketDebuger.kt index f34106249..9def0ed05 100644 --- a/mirai-debug/src/main/kotlin/PacketDebuger.kt +++ b/mirai-debug/src/main/kotlin/PacketDebuger.kt @@ -118,7 +118,7 @@ object PacketDebugger { * 7. 运行完 `mov eax,dword ptr ss:[ebp+10]` * 8. 查看内存, `eax` 到 `eax+10` 的 16 字节就是 `sessionKey` */ - val sessionKey: SessionKey = SessionKey("15 95 8D 22 F7 3B C6 6E FE 91 1B 1B 8F A2 9E 1C".hexToBytes()) + val sessionKey: SessionKey = SessionKey("43 EA BD 3C FF 6A 07 8E E4 13 E9 42 7F AD 03 F1".hexToBytes()) const val qq: UInt = 761025446u val IgnoredPacketIdList: List = listOf(