mirror of
https://github.com/NinjaCheetah/WiiPy.git
synced 2025-04-26 13:21:01 -04:00
Allow fakesigning a file in place via fakesign command
WADs patched with iospatch are also now fakesigned by default when exported.
This commit is contained in:
parent
6af035068c
commit
304539b120
@ -7,7 +7,10 @@ import libWiiPy
|
||||
|
||||
def handle_fakesign(args):
|
||||
input_path = pathlib.Path(args.input)
|
||||
output_path = pathlib.Path(args.output)
|
||||
if args.output is not None:
|
||||
output_path = pathlib.Path(args.output)
|
||||
else:
|
||||
output_path = pathlib.Path(args.input)
|
||||
|
||||
if not input_path.exists():
|
||||
raise FileNotFoundError(input_path)
|
||||
|
@ -93,6 +93,7 @@ def handle_iospatch(args):
|
||||
" compatible with this IOS.")
|
||||
|
||||
if patch_count > 0 or args.version is not None or args.slot is not None:
|
||||
ios_patcher.title.fakesign() # Signature is broken anyway, so fakesign for maximum installation openings
|
||||
if args.output is not None:
|
||||
output_path = pathlib.Path(args.output)
|
||||
output_file = open(output_path, "wb")
|
||||
|
5
wiipy.py
5
wiipy.py
@ -52,10 +52,11 @@ if __name__ == "__main__":
|
||||
|
||||
# Argument parser for the fakesign subcommand.
|
||||
fakesign_parser = subparsers.add_parser("fakesign", help="fakesign a TMD, Ticket, or WAD (trucha bug)",
|
||||
description="fakesign a TMD, Ticket, or WAD (trucha bug)")
|
||||
description="fakesign a TMD, Ticket, or WAD (trucha bug); by default, this "
|
||||
"will overwrite the input file if no output file is specified")
|
||||
fakesign_parser.set_defaults(func=handle_fakesign)
|
||||
fakesign_parser.add_argument("input", metavar="IN", type=str, help="input file")
|
||||
fakesign_parser.add_argument("output", metavar="OUT", type=str, help="output file")
|
||||
fakesign_parser.add_argument("-o", "--output", metavar="OUT", type=str, help="output file (optional)")
|
||||
|
||||
# Argument parser for the iospatch command.
|
||||
iospatch_parser = subparsers.add_parser("iospatch", help="patch IOS WADs to re-enable exploits",
|
||||
|
Loading…
x
Reference in New Issue
Block a user