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: ... class AES_CBC_Decrypt: decrypt: Any = ... def __init__(self, key: Any, iv: Any) -> None: ... def is_rarfile(xfile: Any): ... def is_rarfile_sfx(xfile: Any): ... class Error(Exception): ... class BadRarFile(Error): ... class NotRarFile(Error): ... class BadRarName(Error): ... class NoRarEntry(Error): ... class PasswordRequired(Error): ... class NeedFirstVolume(Error): ... class NoCrypto(Error): ... class RarExecError(Error): ... class RarWarning(RarExecError): ... class RarFatalError(RarExecError): ... class RarCRCError(RarExecError): ... class RarLockedArchiveError(RarExecError): ... class RarWriteError(RarExecError): ... class RarOpenError(RarExecError): ... class RarUserError(RarExecError): ... class RarMemoryError(RarExecError): ... class RarCreateError(RarExecError): ... class RarNoFilesError(RarExecError): ... class RarUserBreak(RarExecError): ... class RarWrongPassword(RarExecError): ... class RarUnknownError(RarExecError): ... class RarSignalExit(RarExecError): ... class RarCannotExec(RarExecError): ... class RarInfo: filename: Any = ... file_size: Any = ... compress_size: Any = ... date_time: Any = ... comment: Any = ... CRC: Any = ... volume: Any = ... orig_filename: Any = ... mtime: Any = ... ctime: Any = ... atime: Any = ... extract_version: Any = ... mode: Any = ... host_os: Any = ... compress_type: Any = ... arctime: Any = ... blake2sp_hash: Any = ... file_redir: Any = ... flags: int = ... type: Any = ... def isdir(self): ... def needs_password(self): ... 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: ... def setpassword(self, password: Any) -> None: ... def needs_password(self): ... def namelist(self): ... def infolist(self): ... def volumelist(self): ... def getinfo(self, fname: Any): ... def open(self, fname: Any, mode: str = ..., psw: Optional[Any] = ...): ... def read(self, fname: Any, psw: Optional[Any] = ...): ... def close(self) -> None: ... def printdir(self) -> None: ... def extract(self, member: Any, path: Optional[Any] = ..., pwd: Optional[Any] = ...) -> None: ... 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: ... def volumelist(self): ... def needs_password(self): ... def strerror(self): ... 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 = ... salt: Any = ... add_size: int = ... header_crc: Any = ... 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 = ... header_crc: Any = ... header_size: Any = ... header_offset: Any = ... data_offset: Any = ... block_type: Any = ... block_flags: Any = ... 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 = ... file_flags: Any = ... file_encryption: Any = ... file_compress_flags: Any = ... file_redir: Any = ... file_owner: Any = ... file_version: Any = ... blake2sp_hash: Any = ... def _must_disable_hack(self): ... class Rar5FileInfo(Rar5BaseFile): type: Any = ... class Rar5ServiceInfo(Rar5BaseFile): type: Any = ... class Rar5MainInfo(Rar5Info): type: Any = ... main_flags: Any = ... main_volume_number: Any = ... def _must_disable_hack(self): ... class Rar5EncryptionInfo(Rar5Info): type: Any = ... encryption_algo: Any = ... encryption_flags: Any = ... encryption_kdf_count: Any = ... encryption_salt: Any = ... encryption_check_value: Any = ... def needs_password(self): ... class Rar5EndArcInfo(Rar5Info): type: Any = ... 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 = ... encdata: Any = ... pos: int = ... buf: Any = ... failed: int = ... def __init__(self, name: Any, encdata: Any) -> None: ... def enc_byte(self): ... def std_byte(self): ... def put(self, lo: Any, hi: Any) -> None: ... def decode(self): ... 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: f: Any = ... ciph: Any = ... buf: Any = ... def __init__(self, f: Any, key: Any, iv: Any) -> None: ... def tell(self): ... 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): ... def seek(self, ofs: Any, whence: int = ...): ... def readinto(self, dst: Any): ... def close(self) -> None: ... def __enter__(self): ... def __exit__(self, typ: Any, val: Any, tb: Any) -> None: ... class NoHashContext: def __init__(self, data: Optional[Any] = ...) -> None: ... def update(self, data: Any) -> None: ... def digest(self) -> None: ... 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): ... 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: ... class ToolSetup: setup: Any = ... def __init__(self, setup: Any) -> None: ... def check(self): ... def open_cmdline(self, psw: Any, rarfn: Any, filefn: Optional[Any] = ...): ... def test_cmdline(self, psw: Any, rarfn: Any): ... def extract_cmdline(self, psw: Any, rarfn: Any, fnlist: Any, path: Any): ... def get_errmap(self): ... def get_cmdline(self, key: Any, psw: Any, nodash: bool = ...): ... def add_password_arg(self, cmdline: Any, psw: Any) -> None: ...