1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-07-01 16:10:24 +08:00

feat: full packet xor

This commit is contained in:
源文雨
2023-08-04 13:00:36 +08:00
parent 37bf73c3dd
commit f474381db8
6 changed files with 39 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ func (m *Me) wait(data []byte) *head.Packet {
if len(data) < 60 { // not a valid packet
return nil
}
data = m.xor(data)
flags := binary.LittleEndian.Uint16(data[10:12])
if flags&0x8000 == 0x8000 { // not a valid packet
return nil