mirror of
https://github.com/NinjaCheetah/WiiPy.git
synced 2026-01-07 11:25:59 -05:00
Minor updates for new libWiiPy changes
This commit is contained in:
parent
4b7eae8e85
commit
ebd6702056
@ -4,7 +4,9 @@
|
|||||||
import binascii
|
import binascii
|
||||||
import pathlib
|
import pathlib
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import libWiiPy
|
import libWiiPy
|
||||||
|
|
||||||
from modules.core import fatal_error
|
from modules.core import fatal_error
|
||||||
|
|
||||||
|
|
||||||
@ -71,8 +73,8 @@ def _print_tmd_info(tmd: libWiiPy.title.TMD, signing_cert=None):
|
|||||||
print(f" Region: {region}")
|
print(f" Region: {region}")
|
||||||
print(f" Title Type: {tmd.get_title_type()}")
|
print(f" Title Type: {tmd.get_title_type()}")
|
||||||
print(f" vWii Title: {bool(tmd.vwii)}")
|
print(f" vWii Title: {bool(tmd.vwii)}")
|
||||||
print(f" DVD Video Access: {tmd.get_access_right(tmd.AccessFlags.DVD_VIDEO)}")
|
print(f" DVD Video Access: {tmd.get_access_right(libWiiPy.title.AccessFlags.DVD_VIDEO)}")
|
||||||
print(f" AHB Access: {tmd.get_access_right(tmd.AccessFlags.AHB)}")
|
print(f" AHB Access: {tmd.get_access_right(libWiiPy.title.AccessFlags.AHB)}")
|
||||||
if signing_cert is not None:
|
if signing_cert is not None:
|
||||||
try:
|
try:
|
||||||
if libWiiPy.title.verify_tmd_sig(signing_cert, tmd):
|
if libWiiPy.title.verify_tmd_sig(signing_cert, tmd):
|
||||||
@ -137,6 +139,7 @@ def _print_ticket_info(ticket: libWiiPy.title.Ticket, signing_cert=None):
|
|||||||
print(f" Certificate Issuer: Root-CA00000002 (Development)")
|
print(f" Certificate Issuer: Root-CA00000002 (Development)")
|
||||||
else:
|
else:
|
||||||
print(f" Certificate Info: {ticket.signature_issuer} (Unknown)")
|
print(f" Certificate Info: {ticket.signature_issuer} (Unknown)")
|
||||||
|
key = ""
|
||||||
match ticket.common_key_index:
|
match ticket.common_key_index:
|
||||||
case 0:
|
case 0:
|
||||||
if ticket.is_dev:
|
if ticket.is_dev:
|
||||||
|
|||||||
@ -44,7 +44,7 @@ def handle_nus_content(args):
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
fatal_error("The specified Title ID or Content ID could not be found!")
|
fatal_error("The specified Title ID or Content ID could not be found!")
|
||||||
|
|
||||||
if decrypt_content is True:
|
if decrypt_content:
|
||||||
output_path = output_path.with_suffix(".app")
|
output_path = output_path.with_suffix(".app")
|
||||||
tmd = libWiiPy.title.TMD()
|
tmd = libWiiPy.title.TMD()
|
||||||
tmd.load(libWiiPy.title.download_tmd(tid, version))
|
tmd.load(libWiiPy.title.download_tmd(tid, version))
|
||||||
@ -175,7 +175,7 @@ def handle_nus_title(args):
|
|||||||
|
|
||||||
# Try to decrypt the contents for this title if a ticket was available.
|
# Try to decrypt the contents for this title if a ticket was available.
|
||||||
if output_dir is not None:
|
if output_dir is not None:
|
||||||
if can_decrypt is True:
|
if can_decrypt:
|
||||||
for content in range(len(title.tmd.content_records)):
|
for content in range(len(title.tmd.content_records)):
|
||||||
print(f" - Decrypting content {content + 1} of {len(title.tmd.content_records)} "
|
print(f" - Decrypting content {content + 1} of {len(title.tmd.content_records)} "
|
||||||
f"(Content ID: {title.tmd.content_records[content].content_id})...")
|
f"(Content ID: {title.tmd.content_records[content].content_id})...")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user