mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 07:55:33 +01:00
Merge remote-tracking branch 'origin/main' into feature/psn-link
# Conflicts: # server/signserver/dbutils.go # server/signserver/dsgn_resp.go # server/signserver/session.go
This commit is contained in:
@@ -62,7 +62,7 @@ func (s *Session) handlePacket(pkt []byte) error {
|
||||
case "VITASGN:100":
|
||||
s.client = VITA
|
||||
s.handlePSSGN(bf)
|
||||
case "WIIUSGN:100":
|
||||
case "WIIUSGN:100", "WIIUSGN:000":
|
||||
s.client = WIIU
|
||||
s.handleWIIUSGN(bf)
|
||||
case "VITACOGLNK:100":
|
||||
@@ -124,6 +124,13 @@ func (s *Session) handleWIIUSGN(bf *byteframe.ByteFrame) {
|
||||
}
|
||||
|
||||
func (s *Session) handlePSSGN(bf *byteframe.ByteFrame) {
|
||||
// Prevent reading malformed request
|
||||
if len(bf.DataFromCurrent()) < 128 {
|
||||
resp := byteframe.NewByteFrame()
|
||||
resp.WriteUint8(uint8(SIGN_EABORT))
|
||||
s.cryptConn.SendPacket(resp.Data())
|
||||
return
|
||||
}
|
||||
_ = bf.ReadNullTerminatedBytes() // VITA = 0000000256, PS3 = 0000000255
|
||||
_ = bf.ReadBytes(2) // VITA = 1, PS3 = !
|
||||
_ = bf.ReadBytes(82)
|
||||
|
||||
Reference in New Issue
Block a user