|
|
@ -1,18 +1,12 @@ |
|
|
|
from io import RawIOBase |
|
|
|
import io |
|
|
|
from datetime import datetime |
|
|
|
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 get_rar_version(xfile: Any): ... |
|
|
|
def is_rarfile(xfile: Any): ... |
|
|
|
def is_rarfile_sfx(xfile: Any): ... |
|
|
|
|
|
|
@ -22,7 +16,11 @@ class NotRarFile(Error): ... |
|
|
|
class BadRarName(Error): ... |
|
|
|
class NoRarEntry(Error): ... |
|
|
|
class PasswordRequired(Error): ... |
|
|
|
class NeedFirstVolume(Error): ... |
|
|
|
|
|
|
|
class NeedFirstVolume(Error): |
|
|
|
current_volume: Any = ... |
|
|
|
def __init__(self, msg: Any, volume: Any) -> None: ... |
|
|
|
|
|
|
|
class NoCrypto(Error): ... |
|
|
|
class RarExecError(Error): ... |
|
|
|
class RarWarning(RarExecError): ... |
|
|
@ -40,13 +38,13 @@ class RarWrongPassword(RarExecError): ... |
|
|
|
class RarUnknownError(RarExecError): ... |
|
|
|
class RarSignalExit(RarExecError): ... |
|
|
|
class RarCannotExec(RarExecError): ... |
|
|
|
class UnsupportedWarning(UserWarning): ... |
|
|
|
|
|
|
|
class RarInfo: |
|
|
|
filename: Any = ... |
|
|
|
file_size: Any = ... |
|
|
|
compress_size: Any = ... |
|
|
|
date_time: Any = ... |
|
|
|
comment: Any = ... |
|
|
|
CRC: Any = ... |
|
|
|
volume: Any = ... |
|
|
|
orig_filename: Any = ... |
|
|
@ -57,42 +55,54 @@ class RarInfo: |
|
|
|
mode: Any = ... |
|
|
|
host_os: Any = ... |
|
|
|
compress_type: Any = ... |
|
|
|
comment: Any = ... |
|
|
|
arctime: Any = ... |
|
|
|
blake2sp_hash: Any = ... |
|
|
|
file_redir: Any = ... |
|
|
|
flags: int = ... |
|
|
|
type: Any = ... |
|
|
|
def isdir(self): ... |
|
|
|
def is_dir(self): ... |
|
|
|
def is_symlink(self): ... |
|
|
|
def is_file(self): ... |
|
|
|
def needs_password(self): ... |
|
|
|
def isdir(self): ... |
|
|
|
|
|
|
|
class RarFile: |
|
|
|
filename: Any = ... |
|
|
|
comment: Any = ... |
|
|
|
_rarfile: Any = ... |
|
|
|
_charset: Any = ... |
|
|
|
_info_callback: Any = ... |
|
|
|
_crc_check: Any = ... |
|
|
|
_part_only: 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 __init__(self, file: Any, mode: str = ..., charset: Optional[Any] = ..., info_callback: Optional[Any] = ..., crc_check: bool = ..., errors: str = ..., part_only: bool = ...) -> None: ... |
|
|
|
def __enter__(self): ... |
|
|
|
def __exit__(self, typ: Any, value: Any, traceback: Any) -> None: ... |
|
|
|
def setpassword(self, password: Any) -> None: ... |
|
|
|
def __iter__(self) -> Any: ... |
|
|
|
def setpassword(self, pwd: 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 getinfo(self, name: Any): ... |
|
|
|
def open(self, name: Any, mode: str = ..., pwd: Optional[Any] = ...): ... |
|
|
|
def read(self, name: Any, pwd: Optional[Any] = ...): ... |
|
|
|
def close(self) -> None: ... |
|
|
|
def printdir(self) -> None: ... |
|
|
|
def extract(self, member: Any, path: Optional[Any] = ..., pwd: Optional[Any] = ...) -> None: ... |
|
|
|
def printdir(self, file: Optional[Any] = ...) -> None: ... |
|
|
|
def extract(self, member: Any, path: Optional[Any] = ..., pwd: Optional[Any] = ...): ... |
|
|
|
def extractall(self, path: Optional[Any] = ..., members: Optional[Any] = ..., pwd: Optional[Any] = ...) -> None: ... |
|
|
|
def testrar(self) -> None: ... |
|
|
|
def testrar(self, pwd: Optional[Any] = ...) -> None: ... |
|
|
|
def strerror(self): ... |
|
|
|
def _parse(self) -> None: ... |
|
|
|
def _extract(self, fnlist: Any, path: Optional[Any] = ..., psw: Optional[Any] = ...) -> None: ... |
|
|
|
def _extract_one(self, info: Any, path: Any, pwd: Any, set_attrs: Any): ... |
|
|
|
def _create_helper(self, name: Any, flags: Any, info: Any): ... |
|
|
|
def _make_file(self, info: Any, dstfn: Any, pwd: Any, set_attrs: Any): ... |
|
|
|
def _make_dir(self, info: Any, dstfn: Any, pwd: Any, set_attrs: Any): ... |
|
|
|
def _make_symlink(self, info: Any, dstfn: Any, pwd: Any, set_attrs: Any): ... |
|
|
|
def _set_attrs(self, info: Any, dstfn: Any) -> None: ... |
|
|
|
|
|
|
|
class CommonParser: |
|
|
|
_main: Any = ... |
|
|
@ -112,9 +122,10 @@ class CommonParser: |
|
|
|
_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: ... |
|
|
|
_part_only: Any = ... |
|
|
|
def __init__(self, rarfile: Any, password: Any, crc_check: Any, charset: Any, strict: Any, info_cb: Any, sfx_offset: Any, part_only: Any) -> None: ... |
|
|
|
def has_header_encryption(self): ... |
|
|
|
def setpassword(self, psw: Any) -> None: ... |
|
|
|
def setpassword(self, pwd: Any) -> None: ... |
|
|
|
def volumelist(self): ... |
|
|
|
def needs_password(self): ... |
|
|
|
def strerror(self): ... |
|
|
@ -125,15 +136,15 @@ class CommonParser: |
|
|
|
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 _open_hack(self, inf: Any, pwd: 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(self, inf: Any, pwd: 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 = ...): ... |
|
|
|
def _open_hack_core(self, inf: Any, pwd: Any, prefix: Any, suffix: Any): ... |
|
|
|
def _open_unrar_membuf(self, memfile: Any, inf: Any, pwd: Any): ... |
|
|
|
def _open_unrar(self, rarfile: Any, inf: Any, pwd: Optional[Any] = ..., tmpfile: Optional[Any] = ..., force_file: bool = ...): ... |
|
|
|
|
|
|
|
class Rar3Info(RarInfo): |
|
|
|
extract_version: int = ... |
|
|
@ -145,9 +156,15 @@ class Rar3Info(RarInfo): |
|
|
|
data_offset: Any = ... |
|
|
|
_md_class: Any = ... |
|
|
|
_md_expect: Any = ... |
|
|
|
_name_size: Any = ... |
|
|
|
file_redir: Any = ... |
|
|
|
blake2sp_hash: Any = ... |
|
|
|
endarc_datacrc: Any = ... |
|
|
|
endarc_volnr: Any = ... |
|
|
|
def _must_disable_hack(self): ... |
|
|
|
def is_dir(self): ... |
|
|
|
def is_symlink(self): ... |
|
|
|
def is_file(self): ... |
|
|
|
|
|
|
|
class RAR3Parser(CommonParser): |
|
|
|
_expect_sig: Any = ... |
|
|
@ -156,13 +173,13 @@ class RAR3Parser(CommonParser): |
|
|
|
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 _read_comment_v3(self, inf: Any, pwd: 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): ... |
|
|
|
def _open_hack(self, inf: Any, pwd: Any): ... |
|
|
|
|
|
|
|
class Rar5Info(RarInfo): |
|
|
|
extract_version: int = ... |
|
|
@ -192,6 +209,9 @@ class Rar5BaseFile(Rar5Info): |
|
|
|
|
|
|
|
class Rar5FileInfo(Rar5BaseFile): |
|
|
|
type: Any = ... |
|
|
|
def is_symlink(self): ... |
|
|
|
def is_file(self): ... |
|
|
|
def is_dir(self): ... |
|
|
|
|
|
|
|
class Rar5ServiceInfo(Rar5BaseFile): |
|
|
|
type: Any = ... |
|
|
@ -237,7 +257,7 @@ class RAR5Parser(CommonParser): |
|
|
|
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): ... |
|
|
|
def _open_hack(self, inf: Any, pwd: Any): ... |
|
|
|
|
|
|
|
class UnicodeFilename: |
|
|
|
std_name: Any = ... |
|
|
@ -251,7 +271,7 @@ class UnicodeFilename: |
|
|
|
def put(self, lo: Any, hi: Any) -> None: ... |
|
|
|
def decode(self): ... |
|
|
|
|
|
|
|
class RarExtFile(RawIOBase): |
|
|
|
class RarExtFile(io.RawIOBase): |
|
|
|
name: Any = ... |
|
|
|
mode: str = ... |
|
|
|
_parser: Any = ... |
|
|
@ -260,16 +280,15 @@ class RarExtFile(RawIOBase): |
|
|
|
_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 _open_extfile(self, parser: Any, inf: Any) -> None: ... |
|
|
|
def read(self, n: int = ...): ... |
|
|
|
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 seek(self, offset: Any, whence: int = ...): ... |
|
|
|
def _skip(self, cnt: Any) -> None: ... |
|
|
|
def readable(self): ... |
|
|
|
def writable(self): ... |
|
|
@ -280,11 +299,11 @@ class PipeReader(RarExtFile): |
|
|
|
_cmd: Any = ... |
|
|
|
_proc: Any = ... |
|
|
|
_tempfile: Any = ... |
|
|
|
def __init__(self, rf: Any, inf: Any, cmd: Any, tempfile: Optional[Any] = ...) -> None: ... |
|
|
|
def __init__(self, parser: Any, inf: Any, cmd: Any, tempfile: Optional[Any] = ...) -> None: ... |
|
|
|
_returncode: Any = ... |
|
|
|
def _close_proc(self) -> None: ... |
|
|
|
_fd: Any = ... |
|
|
|
def _open(self) -> None: ... |
|
|
|
def _open_extfile(self, parser: Any, inf: Any) -> None: ... |
|
|
|
def _read(self, cnt: Any): ... |
|
|
|
def close(self) -> None: ... |
|
|
|
def readinto(self, buf: Any): ... |
|
|
@ -293,8 +312,9 @@ class DirectReader(RarExtFile): |
|
|
|
_cur: Any = ... |
|
|
|
_cur_avail: Any = ... |
|
|
|
_volfile: Any = ... |
|
|
|
def __init__(self, parser: Any, inf: Any) -> None: ... |
|
|
|
_fd: Any = ... |
|
|
|
def _open(self) -> None: ... |
|
|
|
def _open_extfile(self, parser: Any, inf: Any) -> None: ... |
|
|
|
def _skip(self, cnt: Any) -> None: ... |
|
|
|
def _read(self, cnt: Any): ... |
|
|
|
def _open_next(self): ... |
|
|
@ -303,7 +323,7 @@ class DirectReader(RarExtFile): |
|
|
|
class HeaderDecrypt: |
|
|
|
f: Any = ... |
|
|
|
ciph: Any = ... |
|
|
|
buf: Any = ... |
|
|
|
buf: bytes = ... |
|
|
|
def __init__(self, f: Any, key: Any, iv: Any) -> None: ... |
|
|
|
def tell(self): ... |
|
|
|
def read(self, cnt: Optional[Any] = ...): ... |
|
|
@ -316,7 +336,7 @@ class XFile: |
|
|
|
def read(self, n: Optional[Any] = ...): ... |
|
|
|
def tell(self): ... |
|
|
|
def seek(self, ofs: Any, whence: int = ...): ... |
|
|
|
def readinto(self, dst: Any): ... |
|
|
|
def readinto(self, buf: Any): ... |
|
|
|
def close(self) -> None: ... |
|
|
|
def __enter__(self): ... |
|
|
|
def __exit__(self, typ: Any, val: Any, tb: Any) -> None: ... |
|
|
@ -366,21 +386,27 @@ class Rar3Sha1: |
|
|
|
def hexdigest(self): ... |
|
|
|
def _corrupt(self, data: Any, dpos: Any) -> None: ... |
|
|
|
|
|
|
|
class XTempFile: |
|
|
|
class nsdatetime(datetime): |
|
|
|
__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: ... |
|
|
|
nanosecond: int |
|
|
|
def __new__(cls, year: Any, month: Any, day: Any, hour: int = ..., minute: int = ..., second: int = ..., microsecond: int = ..., tzinfo: Optional[Any] = ..., *, fold: int = ..., nanosecond: int = ...): ... |
|
|
|
def isoformat(self, sep: str = ..., timespec: str = ...): ... |
|
|
|
def astimezone(self, tz: Optional[Any] = ...): ... |
|
|
|
def replace(self, year: Optional[Any] = ..., month: Optional[Any] = ..., day: Optional[Any] = ..., hour: Optional[Any] = ..., minute: Optional[Any] = ..., second: Optional[Any] = ..., microsecond: Optional[Any] = ..., tzinfo: Optional[Any] = ..., *, fold: Optional[Any] = ..., nanosecond: Optional[Any] = ...): ... |
|
|
|
def __hash__(self) -> Any: ... |
|
|
|
def __eq__(self, other: Any) -> Any: ... |
|
|
|
def __gt__(self, other: Any) -> Any: ... |
|
|
|
def __lt__(self, other: Any) -> Any: ... |
|
|
|
def __ge__(self, other: Any) -> Any: ... |
|
|
|
def __le__(self, other: Any) -> Any: ... |
|
|
|
def __ne__(self, other: Any) -> Any: ... |
|
|
|
|
|
|
|
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 open_cmdline(self, pwd: Any, rarfn: Any, filefn: Optional[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: ... |
|
|
|
def get_cmdline(self, key: Any, pwd: Any, nodash: bool = ...): ... |
|
|
|
def add_file_arg(self, cmdline: Any, filename: Any) -> None: ... |
|
|
|
def add_password_arg(self, cmdline: Any, pwd: Any) -> None: ... |
|
|
|