Improve debugger

This commit is contained in:
Him188 2019-11-24 16:54:13 +08:00
parent 825da14f15
commit 77eb98f897
3 changed files with 8 additions and 4 deletions

1
debuggui.cmd Normal file
View File

@ -0,0 +1 @@
gradle :mirai-debug:run

View File

@ -76,7 +76,7 @@ class HexDebuggerGui : View("s") {
private lateinit var outUVarInt: TextField private lateinit var outUVarInt: TextField
private lateinit var outShort: TextField private lateinit var outShort: TextField
private lateinit var outUInt: TextField private lateinit var outUInt: TextField
private lateinit var outString: TextField private lateinit var outString: TextArea
private val clip = Toolkit.getDefaultToolkit().systemClipboard private val clip = Toolkit.getDefaultToolkit().systemClipboard
@ -195,7 +195,8 @@ class HexDebuggerGui : View("s") {
} }
vbox(10) { vbox(10) {
alignment = Pos.CENTER_RIGHT paddingTop = 10
alignment = Pos.TOP_RIGHT
label("size") label("size")
label("UVarInt") label("UVarInt")
label("short") label("short")
@ -229,9 +230,11 @@ class HexDebuggerGui : View("s") {
isEditable = false isEditable = false
} }
outString = textfield { outString = textarea {
promptText = "String" promptText = "String"
isEditable = false isEditable = false
maxWidth = 100.0
minHeight = 30.0
} }
children.filterIsInstance<Region>().forEach { children.filterIsInstance<Region>().forEach {

View File

@ -118,7 +118,7 @@ object PacketDebugger {
* 7. 运行完 `mov eax,dword ptr ss:[ebp+10]` * 7. 运行完 `mov eax,dword ptr ss:[ebp+10]`
* 8. 查看内存, `eax` `eax+10` 16 字节就是 `sessionKey` * 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 const val qq: UInt = 761025446u
val IgnoredPacketIdList: List<PacketId> = listOf( val IgnoredPacketIdList: List<PacketId> = listOf(