From bf3e38ec4981118f8a73dbf538feef8772a84b91 Mon Sep 17 00:00:00 2001 From: Jonathan Barrow Date: Sun, 28 Nov 2021 11:02:22 -0500 Subject: [PATCH] new token format --- crypto.go | 2 +- init.go | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/crypto.go b/crypto.go index 0eb6f12..500d485 100644 --- a/crypto.go +++ b/crypto.go @@ -47,7 +47,7 @@ func decryptToken(encryptedToken []byte) (*nexToken, error) { mode := cipher.NewCBCDecrypter(block, iv) mode.CryptBlocks(decryptedBody, encryptedBody) - decryptedBody = decryptedBody[:0x16] // Remove AES padding + decryptedBody = decryptedBody[:0x17] // Remove AES padding // Verify the token body err = verifySignature(decryptedBody, signature, hmacSecret) diff --git a/init.go b/init.go index b3b6e70..28031a0 100644 --- a/init.go +++ b/init.go @@ -22,11 +22,12 @@ type Config struct { */ type nexToken struct { - SystemType uint8 - TokenType uint8 - UserPID uint32 - TitleID uint64 - CreatTime uint64 + SystemType uint8 + TokenType uint8 + UserPID uint32 + AccessLevel uint8 + TitleID uint64 + ExpireTime uint64 } type ConnectedUser struct {