LibRay/libray/libray.py

50 lines
1.9 KiB
Python
Raw Normal View History

#!/usr/bin/env python3
# -*- coding: utf8 -*-
# libray - Libre Blu-Ray PS3 ISO Tool
2021-06-02 17:20:01 +02:00
# Copyright © 2018 - 2021 Nichlas Severinsen
2019-05-16 10:37:28 +02:00
#
# This file is part of libray.
2019-05-16 10:37:28 +02:00
#
# libray is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
2019-05-16 10:37:28 +02:00
#
# libray is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
2019-05-16 10:37:28 +02:00
#
# You should have received a copy of the GNU General Public License
# along with libray. If not, see <https://www.gnu.org/licenses/>.
import argparse
2019-06-07 09:00:03 +02:00
try:
from libray import core
except ImportError:
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()
2019-11-03 14:49:24 +01:00
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)
2019-11-03 14:49:24 +01:00
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='')
2019-11-03 14:49:24 +01:00
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')
2021-06-02 17:20:01 +02:00
args = parser.parse_args()
core.decrypt(args)