use universal Sign request names

This commit is contained in:
wish
2023-07-25 00:44:19 +10:00
parent a3e1207dfd
commit 7edf07d853

View File

@@ -53,22 +53,22 @@ func (s *Session) work() {
func (s *Session) handlePacket(pkt []byte) error { func (s *Session) handlePacket(pkt []byte) error {
bf := byteframe.NewByteFrameFromBytes(pkt) bf := byteframe.NewByteFrameFromBytes(pkt)
reqType := string(bf.ReadNullTerminatedBytes()) reqType := string(bf.ReadNullTerminatedBytes())
switch reqType { switch reqType[:len(reqType)-3] {
case "DLTSKEYSIGN:100", "DSGN:100": case "DLTSKEYSIGN:", "DSGN:":
s.handleDSGN(bf) s.handleDSGN(bf)
case "PS3SGN:100": case "PS3SGN:":
s.client = PS3 s.client = PS3
s.handlePSSGN(bf) s.handlePSSGN(bf)
case "VITASGN:100": case "VITASGN:":
s.client = VITA s.client = VITA
s.handlePSSGN(bf) s.handlePSSGN(bf)
case "WIIUSGN:100", "WIIUSGN:000": case "WIIUSGN:":
s.client = WIIU s.client = WIIU
s.handleWIIUSGN(bf) s.handleWIIUSGN(bf)
case "VITACOGLNK:100": case "VITACOGLNK:":
s.client = VITA s.client = VITA
s.handlePSNLink(bf) s.handlePSNLink(bf)
case "DELETE:100": case "DELETE:":
token := string(bf.ReadNullTerminatedBytes()) token := string(bf.ReadNullTerminatedBytes())
characterID := int(bf.ReadUint32()) characterID := int(bf.ReadUint32())
tokenID := bf.ReadUint32() tokenID := bf.ReadUint32()