Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
parser.add_argument("-H", "--hash-table", action="store_true",
dest="hash_table", help="print hash table"),
parser.add_argument("-b", "--block-table", action="store_true",
dest="block_table", help="print block table"),
parser.add_argument("-s", "--skip-listfile", action="store_true",
dest="skip_listfile", help="skip reading (listfile)"),
parser.add_argument("-t", "--list-files", action="store_true", dest="list",
help="list files inside the archive")
parser.add_argument("-x", "--extract", action="store_true", dest="extract",
help="extract files from the archive")
args = parser.parse_args()
if args.file:
if not args.skip_listfile:
archive = MPQArchive(args.file)
else:
archive = MPQArchive(args.file, listfile=False)
if args.headers:
archive.print_headers()
if args.hash_table:
archive.print_hash_table()
if args.block_table:
archive.print_block_table()
if args.list:
archive.print_files()
if args.extract:
archive.extract_to_disk()
parser.add_argument("-I", "--headers", action="store_true", dest="headers",
help="print header information from the archive")
parser.add_argument("-H", "--hash-table", action="store_true",
dest="hash_table", help="print hash table"),
parser.add_argument("-b", "--block-table", action="store_true",
dest="block_table", help="print block table"),
parser.add_argument("-s", "--skip-listfile", action="store_true",
dest="skip_listfile", help="skip reading (listfile)"),
parser.add_argument("-t", "--list-files", action="store_true", dest="list",
help="list files inside the archive")
parser.add_argument("-x", "--extract", action="store_true", dest="extract",
help="extract files from the archive")
args = parser.parse_args()
if args.file:
if not args.skip_listfile:
archive = MPQArchive(args.file)
else:
archive = MPQArchive(args.file, listfile=False)
if args.headers:
archive.print_headers()
if args.hash_table:
archive.print_hash_table()
if args.block_table:
archive.print_block_table()
if args.list:
archive.print_files()
if args.extract:
archive.extract_to_disk()