-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrec-decomp
executable file
·27 lines (20 loc) · 990 Bytes
/
rec-decomp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
from tinyscript import *
from reccomp import Decompressor
from reccomp.__info__ import *
__training__ = "ZSIS CTF - Trivia - Shining (4 points)"
__examples__ = ["archive.zip", "archive.zip -d"]
__doc__ = """
This tool allows to recursively decompress an archive relying on Patool, a
Python library supporting various archive formats.
Note: Password-protected compression is not supported yet. If the tool freezes
while decompressing, it may be necessary to press enter to submit a blank
password, which will stop decompression.
"""
if __name__ == '__main__':
parser.add_argument("archive", help="input archive")
parser.add_argument("-d", dest="delete", action="store_true", help="delete input archive")
parser.add_argument("-p", dest="printf", action="store_true", help="print resulting file, if possible")
initialize(add_time=True)
Decompressor(logger=logger, **vars(args))