Push 0.10.0
This commit is contained in:
parent
266f3fc76d
commit
12c05afa57
25 changed files with 2016 additions and 645 deletions
|
|
@ -2,7 +2,7 @@
|
|||
# -*- coding: utf8 -*-
|
||||
|
||||
# libray - Libre Blu-Ray PS3 ISO Tool
|
||||
# Copyright © 2018 - 2021 Nichlas Severinsen
|
||||
# Copyright © 2018 - 2024 Nichlas Severinsen
|
||||
#
|
||||
# This file is part of libray.
|
||||
#
|
||||
|
|
@ -24,34 +24,40 @@ import argparse
|
|||
|
||||
|
||||
try:
|
||||
from libray import core
|
||||
from libray import core
|
||||
except ImportError:
|
||||
import core
|
||||
import core
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
parser = argparse.ArgumentParser(description='A Libre (FLOSS) Python application for unencrypting, extracting, repackaging, and encrypting PS3 ISOs')
|
||||
parser._action_groups.pop()
|
||||
parser = argparse.ArgumentParser(
|
||||
description='A Libre (FLOSS) Python application for unencrypting, extracting, repackaging, and encrypting PS3 ISOs')
|
||||
|
||||
required = parser.add_argument_group('required arguments')
|
||||
required.add_argument('-i', '--iso', dest='iso', type=str, help='Path to .iso file or stream', required=True)
|
||||
required = parser.add_mutually_exclusive_group(required=True)
|
||||
required.add_argument('-i', '--iso', dest='iso', type=str, help='Path to .iso file or stream')
|
||||
required.add_argument('-k', '--ird', dest='ird', type=str, help='Path to .ird file', default='')
|
||||
|
||||
optional = parser.add_argument_group('optional arguments')
|
||||
optional.add_argument('-o', '--output', dest='output', type=str, help='Output filename', default='')
|
||||
optional.add_argument('-k', '--ird', dest='ird', type=str, help='Path to .ird file', default='')
|
||||
optional.add_argument('-d', '--decryption-key', dest='decryption_key', type=str, help='Manually specify key', default='')
|
||||
optional.add_argument('-v', '--verbose', dest='verbose', help='Increase verbosity', action='count')
|
||||
optional.add_argument('-q', '--quiet', dest='quiet', help='Quiet mode, only prints on error', action='store_true')
|
||||
# -e is reserved for "extract" so re-encrypt is "-r"
|
||||
optional.add_argument('-r', '--re-encrypt', dest='reencrypt', help='Re-encrypt .iso', action='store_true')
|
||||
optional = parser.add_argument_group('optional arguments')
|
||||
optional.add_argument('-o', '--output', dest='output', type=str, help='Output filename', default='')
|
||||
optional.add_argument('-d', '--decryption-key', dest='decryption_key', type=str, help='Manually specify key', default='')
|
||||
optional.add_argument('-v', '--verbose', dest='verbose', help='Increase verbosity', action='count')
|
||||
optional.add_argument('-q', '--quiet', dest='quiet', help='Quiet mode, only prints on error', action='store_true')
|
||||
# -e is reserved for "extract" so re-encrypt is "-r"
|
||||
optional.add_argument('-r', '--re-encrypt', dest='reencrypt', help='Re-encrypt .iso', action='store_true')
|
||||
optional.add_argument('-c', '--checksum', dest='checksum', help='Allow fallback to CRC32 checksum (disabled by default)', action='store_true')
|
||||
optional.add_argument('-t', '--checksum-timeout', dest='checksum_timeout', type=int, help='How many seconds to wait for CRC32 checksum (default 15)', default=15)
|
||||
optional.add_argument('--info', dest='info', action='store_true', help='Print info about .iso or .ird, then quit.')
|
||||
|
||||
args = parser.parse_args()
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.reencrypt:
|
||||
if args.info:
|
||||
core.info(args)
|
||||
|
||||
core.encrypt(args)
|
||||
if not args.iso:
|
||||
core.error('No .iso file given. Use -i/--iso path/to/file.iso')
|
||||
|
||||
else:
|
||||
|
||||
core.decrypt(args)
|
||||
if args.reencrypt:
|
||||
core.encrypt(args)
|
||||
else:
|
||||
core.decrypt(args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue