File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 44import binascii
55import pathlib
66import re
7+
78import libWiiPy
9+
810from modules .core import fatal_error
911
1012
@@ -71,8 +73,8 @@ def _print_tmd_info(tmd: libWiiPy.title.TMD, signing_cert=None):
7173 print (f" Region: { region } " )
7274 print (f" Title Type: { tmd .get_title_type ()} " )
7375 print (f" vWii Title: { bool (tmd .vwii )} " )
74- print (f" DVD Video Access: { tmd .get_access_right (tmd .AccessFlags .DVD_VIDEO )} " )
75- print (f" AHB Access: { tmd .get_access_right (tmd .AccessFlags .AHB )} " )
76+ print (f" DVD Video Access: { tmd .get_access_right (libWiiPy . title .AccessFlags .DVD_VIDEO )} " )
77+ print (f" AHB Access: { tmd .get_access_right (libWiiPy . title .AccessFlags .AHB )} " )
7678 if signing_cert is not None :
7779 try :
7880 if libWiiPy .title .verify_tmd_sig (signing_cert , tmd ):
@@ -137,6 +139,7 @@ def _print_ticket_info(ticket: libWiiPy.title.Ticket, signing_cert=None):
137139 print (f" Certificate Issuer: Root-CA00000002 (Development)" )
138140 else :
139141 print (f" Certificate Info: { ticket .signature_issuer } (Unknown)" )
142+ key = ""
140143 match ticket .common_key_index :
141144 case 0 :
142145 if ticket .is_dev :
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ def handle_nus_content(args):
4444 except ValueError :
4545 fatal_error ("The specified Title ID or Content ID could not be found!" )
4646
47- if decrypt_content is True :
47+ if decrypt_content :
4848 output_path = output_path .with_suffix (".app" )
4949 tmd = libWiiPy .title .TMD ()
5050 tmd .load (libWiiPy .title .download_tmd (tid , version ))
@@ -175,7 +175,7 @@ def handle_nus_title(args):
175175
176176 # Try to decrypt the contents for this title if a ticket was available.
177177 if output_dir is not None :
178- if can_decrypt is True :
178+ if can_decrypt :
179179 for content in range (len (title .tmd .content_records )):
180180 print (f" - Decrypting content { content + 1 } of { len (title .tmd .content_records )} "
181181 f"(Content ID: { title .tmd .content_records [content ].content_id } )..." )
You can’t perform that action at this time.
0 commit comments