File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,14 +106,14 @@ def _print_ticket_info(ticket: libWiiPy.title.Ticket, signing_cert=None):
106106 print (f"Ticket Info" )
107107 ascii_tid = ""
108108 try :
109- ascii_tid = str (bytes .fromhex (ticket .title_id .decode ()[8 :].replace ("00" , "30" )).decode ("ascii" ))
109+ ascii_tid = str (bytes .fromhex (binascii . hexlify ( ticket .title_id ) .decode ()[8 :].replace ("00" , "30" )).decode ("ascii" ))
110110 except UnicodeDecodeError or binascii .Error :
111111 pass
112112 pattern = r"^[a-z0-9!@#$%^&*]{4}$"
113113 if re .fullmatch (pattern , ascii_tid , re .IGNORECASE ):
114- print (f" Title ID: { ticket .title_id .decode ().upper ()} ({ ascii_tid } )" )
114+ print (f" Title ID: { binascii . hexlify ( ticket .title_id ) .decode ().upper ()} ({ ascii_tid } )" )
115115 else :
116- print (f" Title ID: { ticket .title_id .decode ().upper ()} " )
116+ print (f" Title ID: { binascii . hexlify ( ticket .title_id ) .decode ().upper ()} " )
117117 # This type of version number really only applies to the System Menu and IOS.
118118 if ticket .title_id .decode ().startswith ("00000001" ):
119119 if ticket .title_id .decode () == "0000000100000001" :
You can’t perform that action at this time.
0 commit comments