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:
wish
2023-07-24 23:36:38 +10:00
78 changed files with 4417 additions and 997 deletions

View File

@@ -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)