|
|
@ -1,6 +1,10 @@ |
|
|
|
from io import RawIOBase |
|
|
|
from typing import Any, Optional |
|
|
|
|
|
|
|
UNRAR_TOOL : str = "unrar" |
|
|
|
PATH_SEP : str = '/' |
|
|
|
def custom_check(cmd: Any, ignore_retcode : bool = False): ... |
|
|
|
|
|
|
|
class AES_CBC_Decrypt: |
|
|
|
decrypt: Any = ... |
|
|
|
def __init__(self, key: Any, iv: Any) -> None: ... |
|
|
@ -63,6 +67,13 @@ class RarInfo: |
|
|
|
|
|
|
|
class RarFile: |
|
|
|
comment: Any = ... |
|
|
|
_rarfile: Any = ... |
|
|
|
_charset: Any = ... |
|
|
|
_info_callback: Any = ... |
|
|
|
_crc_check: Any = ... |
|
|
|
_password: Any = ... |
|
|
|
_file_parser: Any = ... |
|
|
|
_strict: bool = ... |
|
|
|
def __init__(self, rarfile: Any, mode: str = ..., charset: Optional[Any] = ..., info_callback: Optional[Any] = ..., crc_check: bool = ..., errors: str = ...) -> None: ... |
|
|
|
def __enter__(self): ... |
|
|
|
def __exit__(self, typ: Any, value: Any, traceback: Any) -> None: ... |
|
|
@ -80,9 +91,27 @@ class RarFile: |
|
|
|
def extractall(self, path: Optional[Any] = ..., members: Optional[Any] = ..., pwd: Optional[Any] = ...) -> None: ... |
|
|
|
def testrar(self) -> None: ... |
|
|
|
def strerror(self): ... |
|
|
|
def _parse(self) -> None: ... |
|
|
|
def _extract(self, fnlist: Any, path: Optional[Any] = ..., psw: Optional[Any] = ...) -> None: ... |
|
|
|
|
|
|
|
class CommonParser: |
|
|
|
_main: Any = ... |
|
|
|
_hdrenc_main: Any = ... |
|
|
|
_needs_password: bool = ... |
|
|
|
_fd: Any = ... |
|
|
|
_expect_sig: Any = ... |
|
|
|
_parse_error: Any = ... |
|
|
|
_password: Any = ... |
|
|
|
comment: Any = ... |
|
|
|
_rarfile: Any = ... |
|
|
|
_crc_check: Any = ... |
|
|
|
_charset: Any = ... |
|
|
|
_strict: Any = ... |
|
|
|
_info_callback: Any = ... |
|
|
|
_info_list: Any = ... |
|
|
|
_info_map: Any = ... |
|
|
|
_vol_list: Any = ... |
|
|
|
_sfx_offset: Any = ... |
|
|
|
def __init__(self, rarfile: Any, password: Any, crc_check: Any, charset: Any, strict: Any, info_cb: Any, sfx_offset: Any) -> None: ... |
|
|
|
def has_header_encryption(self): ... |
|
|
|
def setpassword(self, psw: Any) -> None: ... |
|
|
@ -92,8 +121,19 @@ class CommonParser: |
|
|
|
def infolist(self): ... |
|
|
|
def getinfo(self, member: Any): ... |
|
|
|
def parse(self) -> None: ... |
|
|
|
def _parse_real(self) -> None: ... |
|
|
|
def process_entry(self, fd: Any, item: Any) -> None: ... |
|
|
|
def _decrypt_header(self, fd: Any) -> None: ... |
|
|
|
def _parse_block_header(self, fd: Any) -> None: ... |
|
|
|
def _open_hack(self, inf: Any, psw: Any) -> None: ... |
|
|
|
def _parse_header(self, fd: Any): ... |
|
|
|
def _next_volname(self, volfile: Any): ... |
|
|
|
def _set_error(self, msg: Any, *args: Any) -> None: ... |
|
|
|
def open(self, inf: Any, psw: Any): ... |
|
|
|
def _open_clear(self, inf: Any): ... |
|
|
|
def _open_hack_core(self, inf: Any, psw: Any, prefix: Any, suffix: Any): ... |
|
|
|
def _open_unrar_membuf(self, memfile: Any, inf: Any, psw: Any): ... |
|
|
|
def _open_unrar(self, rarfile: Any, inf: Any, psw: Optional[Any] = ..., tmpfile: Optional[Any] = ..., force_file: bool = ...): ... |
|
|
|
|
|
|
|
class Rar3Info(RarInfo): |
|
|
|
extract_version: int = ... |
|
|
@ -103,12 +143,26 @@ class Rar3Info(RarInfo): |
|
|
|
header_size: Any = ... |
|
|
|
header_offset: Any = ... |
|
|
|
data_offset: Any = ... |
|
|
|
_md_class: Any = ... |
|
|
|
_md_expect: Any = ... |
|
|
|
file_redir: Any = ... |
|
|
|
blake2sp_hash: Any = ... |
|
|
|
def _must_disable_hack(self): ... |
|
|
|
|
|
|
|
class RAR3Parser(CommonParser): |
|
|
|
_expect_sig: Any = ... |
|
|
|
_last_aes_key: Any = ... |
|
|
|
def _decrypt_header(self, fd: Any): ... |
|
|
|
def _parse_block_header(self, fd: Any): ... |
|
|
|
def _parse_file_header(self, h: Any, hdata: Any, pos: Any): ... |
|
|
|
def _parse_subblocks(self, h: Any, hdata: Any, pos: Any): ... |
|
|
|
def _read_comment_v3(self, inf: Any, psw: Optional[Any] = ...): ... |
|
|
|
def _decode(self, val: Any): ... |
|
|
|
def _decode_comment(self, val: Any): ... |
|
|
|
comment: Any = ... |
|
|
|
_needs_password: bool = ... |
|
|
|
def process_entry(self, fd: Any, item: Any) -> None: ... |
|
|
|
def _open_hack(self, inf: Any, psw: Any): ... |
|
|
|
|
|
|
|
class Rar5Info(RarInfo): |
|
|
|
extract_version: int = ... |
|
|
@ -121,6 +175,9 @@ class Rar5Info(RarInfo): |
|
|
|
add_size: int = ... |
|
|
|
block_extra_size: int = ... |
|
|
|
volume_number: Any = ... |
|
|
|
_md_class: Any = ... |
|
|
|
_md_expect: Any = ... |
|
|
|
def _must_disable_hack(self): ... |
|
|
|
|
|
|
|
class Rar5BaseFile(Rar5Info): |
|
|
|
type: int = ... |
|
|
@ -131,6 +188,7 @@ class Rar5BaseFile(Rar5Info): |
|
|
|
file_owner: Any = ... |
|
|
|
file_version: Any = ... |
|
|
|
blake2sp_hash: Any = ... |
|
|
|
def _must_disable_hack(self): ... |
|
|
|
|
|
|
|
class Rar5FileInfo(Rar5BaseFile): |
|
|
|
type: Any = ... |
|
|
@ -142,6 +200,7 @@ class Rar5MainInfo(Rar5Info): |
|
|
|
type: Any = ... |
|
|
|
main_flags: Any = ... |
|
|
|
main_volume_number: Any = ... |
|
|
|
def _must_disable_hack(self): ... |
|
|
|
|
|
|
|
class Rar5EncryptionInfo(Rar5Info): |
|
|
|
type: Any = ... |
|
|
@ -157,7 +216,28 @@ class Rar5EndArcInfo(Rar5Info): |
|
|
|
endarc_flags: Any = ... |
|
|
|
|
|
|
|
class RAR5Parser(CommonParser): |
|
|
|
_expect_sig: Any = ... |
|
|
|
_hdrenc_main: Any = ... |
|
|
|
_last_aes256_key: Any = ... |
|
|
|
def _gen_key(self, kdf_count: Any, salt: Any): ... |
|
|
|
def _decrypt_header(self, fd: Any): ... |
|
|
|
def _parse_block_header(self, fd: Any): ... |
|
|
|
def _parse_block_common(self, h: Any, hdata: Any): ... |
|
|
|
def _parse_main_block(self, h: Any, hdata: Any, pos: Any): ... |
|
|
|
def _parse_file_block(self, h: Any, hdata: Any, pos: Any): ... |
|
|
|
def _parse_endarc_block(self, h: Any, hdata: Any, pos: Any): ... |
|
|
|
def _parse_encryption_block(self, h: Any, hdata: Any, pos: Any): ... |
|
|
|
def _process_file_extra(self, h: Any, xdata: Any) -> None: ... |
|
|
|
def _parse_file_xtime(self, h: Any, xdata: Any, pos: Any) -> None: ... |
|
|
|
def _parse_file_encryption(self, h: Any, xdata: Any, pos: Any) -> None: ... |
|
|
|
def _parse_file_hash(self, h: Any, xdata: Any, pos: Any) -> None: ... |
|
|
|
def _parse_file_version(self, h: Any, xdata: Any, pos: Any) -> None: ... |
|
|
|
def _parse_file_redir(self, h: Any, xdata: Any, pos: Any) -> None: ... |
|
|
|
def _parse_file_owner(self, h: Any, xdata: Any, pos: Any) -> None: ... |
|
|
|
def process_entry(self, fd: Any, item: Any) -> None: ... |
|
|
|
comment: Any = ... |
|
|
|
def _load_comment(self, fd: Any, item: Any) -> None: ... |
|
|
|
def _open_hack(self, inf: Any, psw: Any): ... |
|
|
|
|
|
|
|
class UnicodeFilename: |
|
|
|
std_name: Any = ... |
|
|
@ -174,24 +254,50 @@ class UnicodeFilename: |
|
|
|
class RarExtFile(RawIOBase): |
|
|
|
name: Any = ... |
|
|
|
mode: str = ... |
|
|
|
_parser: Any = ... |
|
|
|
_inf: Any = ... |
|
|
|
_fd: Any = ... |
|
|
|
_remain: int = ... |
|
|
|
_returncode: int = ... |
|
|
|
_md_context: Any = ... |
|
|
|
def __init__(self, parser: Any, inf: Any) -> None: ... |
|
|
|
def _open(self) -> None: ... |
|
|
|
def read(self, cnt: Optional[Any] = ...): ... |
|
|
|
def _check(self) -> None: ... |
|
|
|
def _read(self, cnt: Any) -> None: ... |
|
|
|
def close(self) -> None: ... |
|
|
|
def __del__(self) -> None: ... |
|
|
|
def readinto(self, buf: Any) -> None: ... |
|
|
|
def tell(self): ... |
|
|
|
def seek(self, ofs: Any, whence: int = ...): ... |
|
|
|
def _skip(self, cnt: Any) -> None: ... |
|
|
|
def readable(self): ... |
|
|
|
def writable(self): ... |
|
|
|
def seekable(self): ... |
|
|
|
def readall(self): ... |
|
|
|
|
|
|
|
class PipeReader(RarExtFile): |
|
|
|
_cmd: Any = ... |
|
|
|
_proc: Any = ... |
|
|
|
_tempfile: Any = ... |
|
|
|
def __init__(self, rf: Any, inf: Any, cmd: Any, tempfile: Optional[Any] = ...) -> None: ... |
|
|
|
_returncode: Any = ... |
|
|
|
def _close_proc(self) -> None: ... |
|
|
|
_fd: Any = ... |
|
|
|
def _open(self) -> None: ... |
|
|
|
def _read(self, cnt: Any): ... |
|
|
|
def close(self) -> None: ... |
|
|
|
def readinto(self, buf: Any): ... |
|
|
|
|
|
|
|
class DirectReader(RarExtFile): |
|
|
|
_cur: Any = ... |
|
|
|
_cur_avail: Any = ... |
|
|
|
_volfile: Any = ... |
|
|
|
_fd: Any = ... |
|
|
|
def _open(self) -> None: ... |
|
|
|
def _skip(self, cnt: Any) -> None: ... |
|
|
|
def _read(self, cnt: Any): ... |
|
|
|
def _open_next(self): ... |
|
|
|
def readinto(self, buf: Any): ... |
|
|
|
|
|
|
|
class HeaderDecrypt: |
|
|
@ -203,6 +309,9 @@ class HeaderDecrypt: |
|
|
|
def read(self, cnt: Optional[Any] = ...): ... |
|
|
|
|
|
|
|
class XFile: |
|
|
|
__slots__: Any = ... |
|
|
|
_need_close: bool = ... |
|
|
|
_fd: Any = ... |
|
|
|
def __init__(self, xfile: Any, bufsize: int = ...) -> None: ... |
|
|
|
def read(self, n: Optional[Any] = ...): ... |
|
|
|
def tell(self): ... |
|
|
@ -219,16 +328,25 @@ class NoHashContext: |
|
|
|
def hexdigest(self) -> None: ... |
|
|
|
|
|
|
|
class CRC32Context: |
|
|
|
__slots__: Any = ... |
|
|
|
_crc: int = ... |
|
|
|
def __init__(self, data: Optional[Any] = ...) -> None: ... |
|
|
|
def update(self, data: Any) -> None: ... |
|
|
|
def digest(self): ... |
|
|
|
def hexdigest(self): ... |
|
|
|
|
|
|
|
class Blake2SP: |
|
|
|
__slots__: Any = ... |
|
|
|
digest_size: int = ... |
|
|
|
block_size: int = ... |
|
|
|
parallelism: int = ... |
|
|
|
_buf: bytes = ... |
|
|
|
_cur: int = ... |
|
|
|
_digest: Any = ... |
|
|
|
_thread: Any = ... |
|
|
|
def __init__(self, data: Optional[Any] = ...) -> None: ... |
|
|
|
def _blake2s(self, ofs: Any, depth: Any, is_last: Any): ... |
|
|
|
def _add_block(self, blk: Any) -> None: ... |
|
|
|
def update(self, data: Any) -> None: ... |
|
|
|
def digest(self): ... |
|
|
|
def hexdigest(self): ... |
|
|
@ -236,12 +354,22 @@ class Blake2SP: |
|
|
|
class Rar3Sha1: |
|
|
|
digest_size: int = ... |
|
|
|
block_size: int = ... |
|
|
|
_BLK_BE: Any = ... |
|
|
|
_BLK_LE: Any = ... |
|
|
|
__slots__: Any = ... |
|
|
|
_md: Any = ... |
|
|
|
_nbytes: int = ... |
|
|
|
_rarbug: Any = ... |
|
|
|
def __init__(self, data: bytes = ..., rarbug: bool = ...) -> None: ... |
|
|
|
def update(self, data: Any) -> None: ... |
|
|
|
def digest(self): ... |
|
|
|
def hexdigest(self): ... |
|
|
|
def _corrupt(self, data: Any, dpos: Any) -> None: ... |
|
|
|
|
|
|
|
class XTempFile: |
|
|
|
__slots__: Any = ... |
|
|
|
_tmpfile: Any = ... |
|
|
|
_filename: Any = ... |
|
|
|
def __init__(self, rarfile: Any) -> None: ... |
|
|
|
def __enter__(self): ... |
|
|
|
def __exit__(self, exc_type: Any, exc_value: Any, tb: Any) -> None: ... |
|
|
|