rarfile-3.1/0000755000175000017500000000000013537441230011105 5ustar hlehlerarfile-3.1/doc/0000755000175000017500000000000013537441230011652 5ustar hlehlerarfile-3.1/doc/api.rst0000644000175000017500000000355513447402474013174 0ustar hlehle rarfile API documentation ========================= .. contents:: Table Of Contents Introduction ------------ .. automodule:: rarfile RarFile class ------------- .. autoclass:: RarFile :members: :inherited-members: RarInfo class ------------- .. autoclass:: RarInfo :members: :inherited-members: RarExtFile class ---------------- .. autoclass:: RarExtFile :members: :inherited-members: Functions --------- .. autofunction:: is_rarfile Module Configuration -------------------- .. autodata:: UNRAR_TOOL .. autodata:: DEFAULT_CHARSET .. autodata:: TRY_ENCODINGS .. autodata:: PATH_SEP .. autodata:: USE_EXTRACT_HACK .. autodata:: HACK_SIZE_LIMIT Constants --------- .. py:data:: RAR_M0 No compression. .. py:data:: RAR_M1 Compression level `-m1` - Fastest compression. .. py:data:: RAR_M2 Compression level `-m2`. .. py:data:: RAR_M3 Compression level `-m3`. .. py:data:: RAR_M4 Compression level `-m4`. .. py:data:: RAR_M5 Compression level `-m5` - Maximum compression. .. py:data:: RAR_OS_MSDOS .. py:data:: RAR_OS_OS2 .. py:data:: RAR_OS_WIN32 .. py:data:: RAR_OS_UNIX .. py:data:: RAR_OS_MACOS .. py:data:: RAR_OS_BEOS Exceptions ---------- .. autoclass:: Error .. autoclass:: BadRarFile .. autoclass:: NotRarFile .. autoclass:: BadRarName .. autoclass:: NoRarEntry .. autoclass:: PasswordRequired .. autoclass:: NeedFirstVolume .. autoclass:: NoCrypto .. autoclass:: RarExecError .. autoclass:: RarWarning .. autoclass:: RarFatalError .. autoclass:: RarCRCError .. autoclass:: RarLockedArchiveError .. autoclass:: RarWriteError .. autoclass:: RarOpenError .. autoclass:: RarUserError .. autoclass:: RarMemoryError .. autoclass:: RarCreateError .. autoclass:: RarNoFilesError .. autoclass:: RarUserBreak .. autoclass:: RarWrongPassword .. autoclass:: RarUnknownError .. autoclass:: RarSignalExit .. autoclass:: RarCannotExec rarfile-3.1/doc/make.bat0000644000175000017500000001175213447402474013274 0ustar hlehle@ECHO OFF REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set BUILDDIR=_build set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . set I18NSPHINXOPTS=%SPHINXOPTS% . if NOT "%PAPER%" == "" ( set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% ) if "%1" == "" goto help if "%1" == "help" ( :help echo.Please use `make ^` where ^ is one of echo. html to make standalone HTML files echo. dirhtml to make HTML files named index.html in directories echo. singlehtml to make a single large HTML file echo. pickle to make pickle files echo. json to make JSON files echo. htmlhelp to make HTML files and a HTML help project echo. qthelp to make HTML files and a qthelp project echo. devhelp to make HTML files and a Devhelp project echo. epub to make an epub echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter echo. text to make text files echo. man to make manual pages echo. texinfo to make Texinfo files echo. gettext to make PO message catalogs echo. changes to make an overview over all changed/added/deprecated items echo. linkcheck to check all external links for integrity echo. doctest to run all doctests embedded in the documentation if enabled goto end ) if "%1" == "clean" ( for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i del /q /s %BUILDDIR%\* goto end ) if "%1" == "html" ( %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/html. goto end ) if "%1" == "dirhtml" ( %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. goto end ) if "%1" == "singlehtml" ( %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. goto end ) if "%1" == "pickle" ( %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the pickle files. goto end ) if "%1" == "json" ( %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the JSON files. goto end ) if "%1" == "htmlhelp" ( %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run HTML Help Workshop with the ^ .hhp project file in %BUILDDIR%/htmlhelp. goto end ) if "%1" == "qthelp" ( %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run "qcollectiongenerator" with the ^ .qhcp project file in %BUILDDIR%/qthelp, like this: echo.^> qcollectiongenerator %BUILDDIR%\qthelp\RarFile.qhcp echo.To view the help file: echo.^> assistant -collectionFile %BUILDDIR%\qthelp\RarFile.ghc goto end ) if "%1" == "devhelp" ( %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp if errorlevel 1 exit /b 1 echo. echo.Build finished. goto end ) if "%1" == "epub" ( %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub if errorlevel 1 exit /b 1 echo. echo.Build finished. The epub file is in %BUILDDIR%/epub. goto end ) if "%1" == "latex" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex if errorlevel 1 exit /b 1 echo. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. goto end ) if "%1" == "text" ( %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text if errorlevel 1 exit /b 1 echo. echo.Build finished. The text files are in %BUILDDIR%/text. goto end ) if "%1" == "man" ( %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man if errorlevel 1 exit /b 1 echo. echo.Build finished. The manual pages are in %BUILDDIR%/man. goto end ) if "%1" == "texinfo" ( %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo if errorlevel 1 exit /b 1 echo. echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. goto end ) if "%1" == "gettext" ( %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale if errorlevel 1 exit /b 1 echo. echo.Build finished. The message catalogs are in %BUILDDIR%/locale. goto end ) if "%1" == "changes" ( %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes if errorlevel 1 exit /b 1 echo. echo.The overview file is in %BUILDDIR%/changes. goto end ) if "%1" == "linkcheck" ( %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck if errorlevel 1 exit /b 1 echo. echo.Link check complete; look for any errors in the above output ^ or in %BUILDDIR%/linkcheck/output.txt. goto end ) if "%1" == "doctest" ( %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest if errorlevel 1 exit /b 1 echo. echo.Testing of doctests in the sources finished, look at the ^ results in %BUILDDIR%/doctest/output.txt. goto end ) :end rarfile-3.1/doc/news.rst0000644000175000017500000002463113537440177013377 0ustar hlehle rarfile history =============== .. py:currentmodule:: rarfile Version 3.1 (2019-09-15) ------------------------ **This will be last version with support for Python 2.x** New feature: * Accept pathlib objects as filenames. (Aleksey Popov) * Accept `bytes` filenames in Python 3 (Nate Bogdanowicz) Fixes: * Use bug-compatible SHA1 for longer passwords (> 28 chars) in RAR3 encrypted headers. (Marko Kreen) * Return true/false from _check_unrar_tool (miigotu) * Include all test files in archive (Benedikt Morbach) * Include volume number in NeedFirstVolume exception if available (rar5). Cleanups: * Convert tests to pytest. Version 3.0 (2016-12-27) ------------------------ New feature: * Support RAR5 archive format. It is actually completely different archive format from RAR3 one, only is uses same file extension and tools are old one. Except incompatibilies noted below, most of code should notice no change, existing :class:`RarInfo` fields will continue using RAR3-compatible values (eg. :attr:`RarInfo.host_os`). RAR5-specific values will use new fields. Incompatibilities between rarfile v2.x and 3.x: * Default :data:`PATH_SEP` is now '/' instead '\\'. * Removed :data:`NEED_COMMENTS` option, comments are always extracted. * Removed :data:`UNICODE_COMMENTS` option, they are always decoded. * Removed :data:`USE_DATETIME` option, :attr:`RarInfo.date_time` is always tuple, :attr:`RarInfo.mtime`, :attr:`RarInfo.atime`, :attr:`RarInfo.ctime` and :attr:`RarInfo.arctime` are always :class:`datetime.datetime` objects. Fixes: * Fixed bug when calling rarfp.open() on a RarInfo structure. Cleanups: * Code refactor to allow 2 different file format parsers. * Code cleanups to pass modern linters. * New testing and linting setup based on Tox_. * Use setuptools instead distutils for install. .. _Tox: https://tox.readthedocs.io/en/latest/ Version 2.8 (2016-06-07) ------------------------ * Fix: support solid archives from in-memory file object. Full archive will be written out to temp file. [`#21 `_] * Fix: ask unrar stop switches scanning, to handle archive names starting with "-". (Alexander Shadchin) [`#12 `_] * Fix: add missing _parse_error variable to RarFile object. (Gregory Mazzola) [`#20 `_] * Fix: return proper boolean from :meth:`RarInfo.needs_password`. [`#22 `_] * Fix: do not insert non-string rarfile into exception string. (Tim Muller) [`#23 `_] * Fix: make :meth:`RarFile.extract` and :meth:`RarFile.testrar` support in-memory archives. * Use cryptography_ module as preferred crypto backend. PyCrypto_ will be used as fallback. * Cleanup: remove compat code for Python 2.4/2.5/2.6. .. _cryptography: https://pypi.python.org/pypi/cryptography .. _PyCrypto: https://pypi.python.org/pypi/pycrypto Version 2.7 (2014-11-23) ------------------------ * Allow use of bsdtar_ as decompression backend. It sits on top of libarchive_, which has support for reading RAR archives. Limitations of ``libarchive`` RAR backend: - Does not support solid archives. - Does not support password-protected archives. - Does not support "parsing filters" used for audio/image/executable data, so few non-solid, non-encrypted archives also fail. Now :mod:`rarfile` checks if ``unrar`` and if not then tries ``bsdtar``. If that works, then keeps using it. If not then configuration stays with ``unrar`` which will then appear in error messages. .. _bsdtar: https://github.com/libarchive/libarchive/wiki/ManPageBsdtar1 .. _libarchive: http://www.libarchive.org/ * Both :class:`RarFile` and :func:`is_rarfile` now accept file-like object. Eg. :class:`io.BytesIO`. Only requirement is that the object must be seekable. This mirrors similar funtionality in zipfile. Based on patch by Chase Zhang. * Uniform error handling. :class:`RarFile` accepts ``errors="strict"`` argument. Allow user to tune whether parsing and missing file errors will raise exception. If error is not raised, the error string can be queried with :meth:`RarFile.strerror` method. Version 2.6 (2013-04-10) ------------------------ * Add context manager support for :class:`RarFile` class. Both :class:`RarFile` and :class:`RarExtFile` support :keyword:`with` statement now. (Wentao Han) * :meth:`RarFile.volumelist` method, returns filenames of archive volumes. * Re-throw clearer error in case ``unrar`` is not found in ``PATH``. * Sync new unrar4.x error code from ``rar.txt``. * Use Sphinx for documentation, push docs to rtfd.org_ .. _rtfd.org: https://rarfile.readthedocs.org/ Version 2.5 (2012-01-19) ------------------------ Fixes: * :meth:`RarExtFile.read` and :meth:`RarExtFile.readinto` now do looping read to work properly on short reads. Important for Python 3.2+ where read from pipe can return short result even on blocking file descriptor. * Proper error reporting in :meth:`RarFile.extract`, :meth:`RarFile.extractall` and :meth:`RarFile.testrar`. * :meth:`RarExtFile.read` from unrar pipe: prefer to return unrar error code, if thats not available, do own error checks. * Avoid string addition in :meth:`RarExtFile.read`, instead use always list+join to merge multi-part reads. * dumprar: dont re-encode byte strings (Python 2.x). This avoids unneccessary failure when printing invalid unicode. Version 2.4 (2011-11-05) ------------------------ Fixes: * :data:`USE_DATETIME`: survive bad values from RAR * Fix bug in corrupt unicode filename handling * dumprar: make unicode chars work with both pipe and console Version 2.3 (2011-07-03) ------------------------ Features: * Support .seek() method on file streams. (Kristian Larsson) * Support .readinto() method on file streams. Optimized implementation is available on Python 2.6+ where :class:`memoryview` is available. * Support file comments - :attr:`RarInfo.comment` contains decompressed data if available. * File objects returned by :meth:`RarFile.open()` are :class:`io.RawIOBase`-compatible. They can further wrapped with :class:`io.BufferedReader` and :class:`io.TextIOWrapper`. * Now .getinfo() uses dict lookup instead of sequential scan when searching archive entry. This speeds up prococessing for archives that have many entries. * Option :data:`UNICODE_COMMENTS` to decode both archive and file comments to unicode. It uses :data:`TRY_ENCODINGS` for list of encodings to try. If off, comments are left as byte strings. Default: 0 * Option :data:`PATH_SEP` to change path separator. Default: ``r'\'``, set ``rarfile.PATH_SEP='/'`` to be compatibe with zipfile. * Option :data:`USE_DATETIME` to convert timestamps to datetime objects. Default: 0, timestamps are tuples. * Option :data:`TRY_ENCODINGS` to allow tuning attempted encoding list. * Reorder :class:`RarInfo` fiels to better show zipfile-compatible fields. * Standard regtests to make sure various features work Compatibility: * Drop :attr:`RarInfo.unicode_filename`, plain :attr:`RarInfo.filename` is already unicode since 2.0. * .read(-1) reads now until EOF. Previously it returned empty buffer. Fixes: * Make encrypted headers work with Python 3.x bytes() and with old 2.x 'sha' module. * Simplify :class:`subprocess.Popen` usage when launching ``unrar``. Previously it tried to optimize and work around OS/Python bugs, but this is not maintainable. * Use temp rar file hack on multi-volume archives too. * Always .wait() on unrar, to avoid zombies * Convert struct.error to BadRarFile * Plug some fd leaks. Affected: Jython, PyPy. * Broken archives are handled more robustly. Version 2.2 (2010-08-19) ------------------------ Fixes: * Relaxed volume naming. Now it just calculates new volume name by finding number in old one and increasing it, without any expectations what that number should be. * Files with 4G of compressed data in one colume were handled wrong. Fix. * DOS timestamp seconds need to be multiplied with 2. * Correct EXTTIME parsing. Cleanups: * Compressed size is per-volume, sum them together, so that user sees complete compressed size for files split over several volumes. * dumprar: Show unknown bits. * Use :class:`struct.Struct` to cache unpack formats. * Support missing :data:`os.devnull`. (Python 2.3) Version 2.1 (2010-07-31) ------------------------ Features: * Minimal implmentation for :meth:`RarFile.extract`, :meth:`RarFile.extractall`, :meth:`RarFile.testrar`. They are simple shortcuts to ``unrar`` invocation. * Accept :class:`RarInfo` object where filename is expected. * Include ``dumprar.py`` in .tgz. It can be used to visualize RAR structure and test module. * Support for encrypted file headers. Fixes: * Don't read past ENDARC, there could be non-RAR data there. * RAR 2.x: It does not write ENDARC, but our volume code expected it. Fix that. * RAR 2.x: Support more than 200 old-style volumes. Cleanups: * Load comment only when requested. * Cleanup of internal config variables. They should have now final names. * :meth:`RarFile.open`: Add mode=r argument to match zipfile. * Doc and comments cleanup, minimize duplication. * Common wrappers for both compressed and uncompressed files, now :meth:`RarFile.open` also does CRC-checking. Version 2.0 (2010-04-29) ------------------------ Features: * Python 3 support. Still works with 2.x. * Parses extended time fields. (.mtime, .ctime, .atime) * :meth:`RarFile.open` method. This makes possible to process large entries that do not fit into memory. * Supports password-protected archives. * Supports archive comments. Cleanups: * Uses :mod:`subprocess` module to launch ``unrar``. * .filename is always Unicode string, .unicode_filename is now deprecated. * .CRC is unsigned again, as python3 crc32() is unsigned. Version 1.1 (2008-08-31) ------------------------ Fixes: * Replace :func:`os.tempnam` with :func:`tempfile.mkstemp`. (Jason Moiron) * Fix infinite loop in _extract_hack on unexpected EOF * :attr:`RarInfo.CRC` is now signed value to match crc32() * :meth:`RarFile.read` now checks file crc Cleanups: * more docstrings * throw proper exceptions (subclasses of :exc:`rarfile.Error`) * RarInfo has fields pre-initialized, so they appear in help() * rename RarInfo.data to RarInfo.header_data * dont use "print" when header parsing fails * use try/finally to delete temp rar Version 1.0 (2005-08-08) ------------------------ * First release. rarfile-3.1/doc/faq.rst0000644000175000017500000000645413447402474013173 0ustar hlehle rarfile FAQ =========== .. contents:: Table of Contents What are the dependencies? -------------------------- It depends on ``unrar`` command-line utility to do the actual decompression. Note that by default it expect it to be in ``PATH``. If unrar launching fails, you need to fix this. Alternatively, :mod:`rarfile` can use bsdtar_ from libarchive_ as decompression backend, but that is a bit problematic as bsdtar_ does not support all RAR features. .. _bsdtar: https://github.com/libarchive/libarchive/wiki/ManPageBsdtar1 .. _libarchive: http://www.libarchive.org/ It depends on cryptography_ or PyCrypto_ modules to process archives with password-protected headers. .. _cryptography: https://pypi.python.org/pypi/cryptography .. _PyCrypto: https://pypi.python.org/pypi/pycrypto Does it parse ``unrar`` output to get archive contents? ------------------------------------------------------- No, :mod:`rarfile` parses RAR structure in Python code. Also it can read uncompressed files from archive without external utility. Will rarfile support wrapping unrarlib/unrar.dll/unrar.so in the future? ------------------------------------------------------------------------ No. The current architecture - parsing in Python and decompression with command line tools work well across all interesting operating systems (Windows/Linux/MacOS), wrapping a library does not bring any advantages. Simple execution of command-line tools is also legally simpler situation than linking with external library. How can I get it work on Windows? --------------------------------- On Windows the ``unrar.exe`` is not in ``PATH`` so simple ``Popen("unrar ..")`` does not work. It can be solved several ways: 1. Add location of ``unrar.exe`` to PATH. 2. Set :data:`rarfile.UNRAR_TOOL` to full path of ``unrar.exe``. 3. Copy ``unrar.exe`` to your program directory. 4. Copy ``unrar.exe`` to system directory that is in PATH, eg. ``C:\Windows``. How to avoid the need for user to manually install rarfile/unrar? ----------------------------------------------------------------- Include ``rarfile.py`` and/or ``unrar`` with your application. Will it support creating RAR archives? -------------------------------------- No. RARLAB_ is not interested in RAR becoming open format and specifically discourages writing RAR creation software. In the meantime use either Zip_ (better compatibility) or 7z_ (better compression) format for your own archives. .. _RARLAB: http://www.rarlab.com/ .. _Zip: https://en.wikipedia.org/wiki/ZIP_%28file_format%29 .. _7z: https://en.wikipedia.org/wiki/7z What is the USE_EXTRACT_HACK? ----------------------------- RarFile uses ``unrar`` to extract compressed files. But when extracting single file from archive containing many entries, ``unrar`` needs to parse whole archive until it finds the right entry. This makes random-access to entries slow. To avoid that, RarFile remembers location of compressed data for each entry and on read it copies it to temporary archive containing only data for that one file, thus making ``unrar`` fast. The logic is only activated for entries smaller than :data:`rarfile.HACK_SIZE_LIMIT` (20M by default). Bigger files are accessed directly from RAR. Note - it only works for non-solid archives. So if you care about random access to files in your archive, do not create solid archives. rarfile-3.1/doc/index.rst0000644000175000017500000000211713447402474013523 0ustar hlehle rarfile - RAR archive reader for Python ======================================= This is Python module for RAR_ archive reading. The interface is made as zipfile_ like as possible. Licensed under ISC_ license. Features: - Supports both RAR3 and RAR5 format archives. - Supports multi volume archives. - Supports Unicode filenames. - Supports password-protected archives. - Supports archive and file comments. - Archive parsing and non-compressed files are handled in pure Python code. - Compressed files are extracted by executing external tool: either ``unrar`` from RARLAB_ or ``bsdtar`` from libarchive_. - Works with both Python 2.7 and 3.x. Documentation: .. toctree:: :maxdepth: 1 Module Documentation FAQs Release News Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` .. _RAR: http://en.wikipedia.org/wiki/RAR .. _zipfile: http://docs.python.org/library/zipfile.html .. _ISC: http://en.wikipedia.org/wiki/ISC_license .. _libarchive: https://github.com/libarchive/libarchive .. _RARLAB: http://www.rarlab.com/ rarfile-3.1/doc/Makefile0000644000175000017500000001270013447402474013321 0ustar hlehle# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: -rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/RarFile.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/RarFile.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/RarFile" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/RarFile" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." rarfile-3.1/doc/conf.py0000644000175000017500000001760313537440715013167 0ustar hlehle# -*- coding: utf-8 -*- # # RarFile documentation build configuration file, created by # sphinx-quickstart on Sun Mar 24 13:29:46 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys, os, os.path # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) import rarfile # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. needs_sphinx = '1.3' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.napoleon'] autodoc_member_order = 'bysource' autoclass_content = 'both' autodoc_default_options = {'show-inheritance': True} intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = u'RarFile' copyright = u'2005-2019, Marko Kreen' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = rarfile.__version__ # The full version, including alpha/beta/rc tags. release = rarfile.__version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['_build', 'html'] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". #html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. html_show_sphinx = False # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Output file base name for HTML help builder. #htmlhelp_basename = 'RarFiledoc' # -- Options for LaTeX output -------------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). #'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. #'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'RarFile.tex', u'RarFile Documentation', u'Marko Kreen', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # If true, show page references after internal links. #latex_show_pagerefs = False # If true, show URL addresses after external links. #latex_show_urls = False # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_domain_indices = True # -- Options for manual page output -------------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). #man_pages = [ # ('index', 'rarfile', u'RarFile Documentation', # [u'Marko Kreen'], 1) #] # If true, show URL addresses after external links. #man_show_urls = False # -- Options for Texinfo output ------------------------------------------------ # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'RarFile', u'RarFile Documentation', u'Marko Kreen', 'RarFile', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. #texinfo_appendices = [] # If false, no module index is generated. #texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' rarfile-3.1/dumprar.py0000755000175000017500000003733713537433410013152 0ustar hlehle#! /usr/bin/env python3 """Dump archive contents, test extraction.""" from __future__ import division, absolute_import, print_function import io import sys import getopt from datetime import datetime import rarfile as rf usage = """ dumprar [switches] [ARC1 ARC2 ...] [@ARCLIST] switches: @file read archive names from file -pPSW set password -Ccharset set fallback charset -v increase verbosity -t attempt to read all files -x write read files out -c show archive comment -h show usage -- stop switch parsing """.strip() os_list = ['DOS', 'OS2', 'WIN', 'UNIX', 'MACOS', 'BEOS'] block_strs = ['MARK', 'MAIN', 'FILE', 'OLD_COMMENT', 'OLD_EXTRA', 'OLD_SUB', 'OLD_RECOVERY', 'OLD_AUTH', 'SUB', 'ENDARC'] r5_block_types = { rf.RAR5_BLOCK_MAIN: 'R5_MAIN', rf.RAR5_BLOCK_FILE: 'R5_FILE', rf.RAR5_BLOCK_SERVICE: 'R5_SVC', rf.RAR5_BLOCK_ENCRYPTION: 'R5_ENC', rf.RAR5_BLOCK_ENDARC: 'R5_ENDARC', } def rar3_type(btype): """RAR3 type code as string.""" if btype < rf.RAR_BLOCK_MARK or btype > rf.RAR_BLOCK_ENDARC: return "*UNKNOWN*" return block_strs[btype - rf.RAR_BLOCK_MARK] def rar5_type(btype): """RAR5 type code as string.""" return r5_block_types.get(btype, '*UNKNOWN*') main_bits = ( (rf.RAR_MAIN_VOLUME, "VOL"), (rf.RAR_MAIN_COMMENT, "COMMENT"), (rf.RAR_MAIN_LOCK, "LOCK"), (rf.RAR_MAIN_SOLID, "SOLID"), (rf.RAR_MAIN_NEWNUMBERING, "NEWNR"), (rf.RAR_MAIN_AUTH, "AUTH"), (rf.RAR_MAIN_RECOVERY, "RECOVERY"), (rf.RAR_MAIN_PASSWORD, "PASSWORD"), (rf.RAR_MAIN_FIRSTVOLUME, "FIRSTVOL"), (rf.RAR_SKIP_IF_UNKNOWN, "SKIP"), (rf.RAR_LONG_BLOCK, "LONG"), ) endarc_bits = ( (rf.RAR_ENDARC_NEXT_VOLUME, "NEXTVOL"), (rf.RAR_ENDARC_DATACRC, "DATACRC"), (rf.RAR_ENDARC_REVSPACE, "REVSPACE"), (rf.RAR_ENDARC_VOLNR, "VOLNR"), (rf.RAR_SKIP_IF_UNKNOWN, "SKIP"), (rf.RAR_LONG_BLOCK, "LONG"), ) file_bits = ( (rf.RAR_FILE_SPLIT_BEFORE, "SPLIT_BEFORE"), (rf.RAR_FILE_SPLIT_AFTER, "SPLIT_AFTER"), (rf.RAR_FILE_PASSWORD, "PASSWORD"), (rf.RAR_FILE_COMMENT, "COMMENT"), (rf.RAR_FILE_SOLID, "SOLID"), (rf.RAR_FILE_LARGE, "LARGE"), (rf.RAR_FILE_UNICODE, "UNICODE"), (rf.RAR_FILE_SALT, "SALT"), (rf.RAR_FILE_VERSION, "VERSION"), (rf.RAR_FILE_EXTTIME, "EXTTIME"), (rf.RAR_FILE_EXTFLAGS, "EXTFLAGS"), (rf.RAR_SKIP_IF_UNKNOWN, "SKIP"), (rf.RAR_LONG_BLOCK, "LONG"), ) generic_bits = ( (rf.RAR_SKIP_IF_UNKNOWN, "SKIP"), (rf.RAR_LONG_BLOCK, "LONG"), ) file_parms = ("D64", "D128", "D256", "D512", "D1024", "D2048", "D4096", "DIR") r5_block_flags = ( (rf.RAR5_BLOCK_FLAG_EXTRA_DATA, 'EXTRA'), (rf.RAR5_BLOCK_FLAG_DATA_AREA, 'DATA'), (rf.RAR5_BLOCK_FLAG_SKIP_IF_UNKNOWN, 'SKIP'), (rf.RAR5_BLOCK_FLAG_SPLIT_BEFORE, 'SPLIT_BEFORE'), (rf.RAR5_BLOCK_FLAG_SPLIT_AFTER, 'SPLIT_AFTER'), (rf.RAR5_BLOCK_FLAG_DEPENDS_PREV, 'DEPENDS'), (rf.RAR5_BLOCK_FLAG_KEEP_WITH_PARENT, 'KEEP'), ) r5_main_flags = ( (rf.RAR5_MAIN_FLAG_ISVOL, 'ISVOL'), (rf.RAR5_MAIN_FLAG_HAS_VOLNR, 'VOLNR'), (rf.RAR5_MAIN_FLAG_SOLID, 'SOLID'), (rf.RAR5_MAIN_FLAG_RECOVERY, 'RECOVERY'), (rf.RAR5_MAIN_FLAG_LOCKED, 'LOCKED'), ) r5_file_flags = ( (rf.RAR5_FILE_FLAG_ISDIR, 'DIR'), (rf.RAR5_FILE_FLAG_HAS_MTIME, 'MTIME'), (rf.RAR5_FILE_FLAG_HAS_CRC32, 'CRC32'), (rf.RAR5_FILE_FLAG_UNKNOWN_SIZE, 'NOSIZE'), ) r5_enc_flags = ( (rf.RAR5_ENC_FLAG_HAS_CHECKVAL, 'CHECKVAL'), ) r5_endarc_flags = ( (rf.RAR5_ENDARC_FLAG_NEXT_VOL, 'NEXTVOL'), ) r5_file_enc_flags = ( (rf.RAR5_XENC_CHECKVAL, 'CHECKVAL'), (rf.RAR5_XENC_TWEAKED, 'TWEAKED'), ) r5_file_redir_types = { rf.RAR5_XREDIR_UNIX_SYMLINK: 'UNIX_SYMLINK', rf.RAR5_XREDIR_WINDOWS_SYMLINK: 'WINDOWS_SYMLINK', rf.RAR5_XREDIR_WINDOWS_JUNCTION: 'WINDOWS_JUNCTION', rf.RAR5_XREDIR_HARD_LINK: 'HARD_LINK', rf.RAR5_XREDIR_FILE_COPY: 'FILE_COPY', } r5_file_redir_flags = ( (rf.RAR5_XREDIR_ISDIR, 'DIR'), ) def xprint(m, *args): """Print string to stdout. Format unicode safely. """ if sys.hexversion < 0x3000000: m = m.decode('utf8') if args: m = m % args if sys.hexversion < 0x3000000: m = m.encode('utf8') sys.stdout.write(m) sys.stdout.write('\n') def render_flags(flags, bit_list): """Show bit names. """ res = [] known = 0 for bit in bit_list: known = known | bit[0] if flags & bit[0]: res.append(bit[1]) unknown = flags & ~known n = 0 while unknown: if unknown & 1: res.append("UNK_%04x" % (1 << n)) unknown = unknown >> 1 n += 1 if not res: return '-' return ",".join(res) def get_file_flags(flags): """Show flag names and handle dict size. """ res = render_flags(flags & ~rf.RAR_FILE_DICTMASK, file_bits) xf = (flags & rf.RAR_FILE_DICTMASK) >> 5 res += "," + file_parms[xf] return res def fmt_time(t): """Format time. """ if t is None: return '(-)' if isinstance(t, datetime): return t.isoformat('T') return "%04d-%02d-%02d %02d:%02d:%02d" % t def show_item(h): """Show any RAR3/5 record. """ if isinstance(h, rf.Rar3Info): show_item_v3(h) elif isinstance(h, rf.Rar5Info): show_item_v5(h) else: xprint('Unknown info record') def show_item_v3(h): """Show any RAR3 record. """ st = rar3_type(h.type) xprint("%s: hdrlen=%d datlen=%d", st, h.header_size, h.add_size) if h.type in (rf.RAR_BLOCK_FILE, rf.RAR_BLOCK_SUB): if h.host_os == rf.RAR_OS_UNIX: s_mode = "0%o" % h.mode else: s_mode = "0x%x" % h.mode xprint(" flags=0x%04x:%s", h.flags, get_file_flags(h.flags)) if h.host_os >= 0 and h.host_os < len(os_list): s_os = os_list[h.host_os] else: s_os = "?" xprint(" os=%d:%s ver=%d mode=%s meth=%c cmp=%d dec=%d vol=%d", h.host_os, s_os, h.extract_version, s_mode, h.compress_type, h.compress_size, h.file_size, h.volume) ucrc = (h.CRC + (1 << 32)) & ((1 << 32) - 1) xprint(" crc=0x%08x (%d) date_time=%s", ucrc, h.CRC, fmt_time(h.date_time)) xprint(" name=%s", h.filename) if h.mtime: xprint(" mtime=%s", fmt_time(h.mtime)) if h.ctime: xprint(" ctime=%s", fmt_time(h.ctime)) if h.atime: xprint(" atime=%s", fmt_time(h.atime)) if h.arctime: xprint(" arctime=%s", fmt_time(h.arctime)) elif h.type == rf.RAR_BLOCK_MAIN: xprint(" flags=0x%04x:%s", h.flags, render_flags(h.flags, main_bits)) elif h.type == rf.RAR_BLOCK_ENDARC: xprint(" flags=0x%04x:%s", h.flags, render_flags(h.flags, endarc_bits)) elif h.type == rf.RAR_BLOCK_MARK: xprint(" flags=0x%04x:", h.flags) else: xprint(" flags=0x%04x:%s", h.flags, render_flags(h.flags, generic_bits)) if h.comment is not None: cm = repr(h.comment) if cm[0] == 'u': cm = cm[1:] xprint(" comment=%s", cm) def show_item_v5(h): """Show any RAR5 record. """ st = rar5_type(h.block_type) xprint("%s: hdrlen=%d datlen=%d hdr_extra=%d", st, h.header_size, h.compress_size, h.block_extra_size) xprint(" block_flags=0x%04x:%s", h.block_flags, render_flags(h.block_flags, r5_block_flags)) if h.block_type in (rf.RAR5_BLOCK_FILE, rf.RAR5_BLOCK_SERVICE): xprint(" name=%s", h.filename) if h.file_host_os == rf.RAR5_OS_UNIX: s_os = 'UNIX' s_mode = "0%o" % h.mode else: s_os = 'WINDOWS' s_mode = "0x%x" % h.mode xprint(" file_flags=0x%04x:%s", h.file_flags, render_flags(h.file_flags, r5_file_flags)) cmp_flags = h.file_compress_flags xprint(" cmp_algo=%d cmp_meth=%d dict=%d solid=%r", cmp_flags & 0x3f, (cmp_flags >> 7) & 0x07, cmp_flags >> 10, cmp_flags & rf.RAR5_COMPR_SOLID > 0) xprint(" os=%d:%s mode=%s cmp=%r dec=%r vol=%r", h.file_host_os, s_os, s_mode, h.compress_size, h.file_size, h.volume) if h.CRC is not None: xprint(" crc=0x%08x (%d)", h.CRC, h.CRC) if h.blake2sp_hash is not None: xprint(" blake2sp=%s", rf.tohex(h.blake2sp_hash)) if h.date_time is not None: xprint(" date_time=%s", fmt_time(h.date_time)) if h.mtime: xprint(" mtime=%s", fmt_time(h.mtime)) if h.ctime: xprint(" ctime=%s", fmt_time(h.ctime)) if h.atime: xprint(" atime=%s", fmt_time(h.atime)) if h.arctime: xprint(" arctime=%s", fmt_time(h.arctime)) if h.flags & rf.RAR_FILE_PASSWORD: enc_algo, enc_flags, kdf_count, salt, iv, checkval = h.file_encryption algo_name = 'AES256' if enc_algo == rf.RAR5_XENC_CIPHER_AES256 else 'UnknownAlgo' xprint(' algo=%d:%s enc_flags=%04x:%s kdf_lg=%d kdf_count=%d salt=%s iv=%s checkval=%s', enc_algo, algo_name, enc_flags, render_flags(enc_flags, r5_file_enc_flags), kdf_count, 1 << kdf_count, rf.tohex(salt), rf.tohex(iv), checkval and rf.tohex(checkval) or '-') if h.file_redir: redir_type, redir_flags, redir_name = h.file_redir xprint(' redir: type=%s flags=%d:%s destination=%s', r5_file_redir_types.get(redir_type, 'Unknown'), redir_flags, render_flags(redir_flags, r5_file_redir_flags), redir_name) if h.file_owner: uname, gname, uid, gid = h.file_owner xprint(' owner: name=%r group=%r uid=%r gid=%r', uname, gname, uid, gid) if h.file_version: flags, version = h.file_version xprint(' version: flags=%r version=%r', flags, version) elif h.block_type == rf.RAR5_BLOCK_MAIN: xprint(" flags=0x%04x:%s", h.flags, render_flags(h.main_flags, r5_main_flags)) elif h.block_type == rf.RAR5_BLOCK_ENDARC: xprint(" flags=0x%04x:%s", h.flags, render_flags(h.endarc_flags, r5_endarc_flags)) elif h.block_type == rf.RAR5_BLOCK_ENCRYPTION: algo_name = 'AES256' if h.encryption_algo == rf.RAR5_XENC_CIPHER_AES256 else 'UnknownAlgo' xprint(" algo=%d:%s flags=0x%04x:%s", h.encryption_algo, algo_name, h.flags, render_flags(h.encryption_flags, r5_enc_flags)) xprint(" kdf_lg=%d kdf_count=%d", h.encryption_kdf_count, 1 << h.encryption_kdf_count) xprint(" salt=%s", rf.tohex(h.encryption_salt)) else: xprint(" - missing info -") if h.comment is not None: cm = repr(h.comment) if cm[0] == 'u': cm = cm[1:] xprint(" comment=%s", cm) cf_show_comment = 0 cf_verbose = 0 cf_charset = None cf_extract = 0 cf_test_read = 0 cf_test_unrar = 0 cf_test_memory = 0 def check_crc(f, inf, desc): """Compare result crc to expected value. """ exp = inf._md_expect if exp is None: return ucrc = f._md_context.digest() if ucrc != exp: print('crc error - %s - exp=%r got=%r' % (desc, exp, ucrc)) def test_read_long(r, inf): """Test read and readinto. """ md_class = inf._md_class or rf.NoHashContext bctx = md_class() f = r.open(inf.filename) total = 0 while 1: data = f.read(8192) if not data: break bctx.update(data) total += len(data) if total != inf.file_size: xprint("\n *** %s has corrupt file: %s ***", r.rarfile, inf.filename) xprint(" *** short read: got=%d, need=%d ***\n", total, inf.file_size) check_crc(f, inf, 'read') bhash = bctx.hexdigest() if cf_verbose > 1: if f._md_context.digest() == inf._md_expect: #xprint(" checkhash: %r", bhash) pass else: xprint(" checkhash: %r got=%r exp=%r cls=%r\n", bhash, f._md_context.digest(), inf._md_expect, inf._md_class) # test .seek() & .readinto() if cf_test_read > 1: f.seek(0, 0) total = 0 buf = bytearray(rf.ZERO * 1024) while 1: res = f.readinto(buf) if not res: break total += res if inf.file_size != total: xprint(" *** readinto failed: got=%d, need=%d ***\n", total, inf.file_size) #check_crc(f, inf, 'readinto') f.close() def test_read(r, inf): """Test file read.""" test_read_long(r, inf) def test_real(fn, psw): """Actual archive processing. """ xprint("Archive: %s", fn) cb = None if cf_verbose > 1: cb = show_item rfarg = fn if cf_test_memory: rfarg = io.BytesIO(open(fn, 'rb').read()) # check if rar if not rf.is_rarfile(rfarg): xprint(" --- %s is not a RAR file ---", fn) return # open r = rf.RarFile(rfarg, charset=cf_charset, info_callback=cb) # set password if r.needs_password(): if psw: r.setpassword(psw) else: xprint(" --- %s requires password ---", fn) return # show comment if cf_show_comment and r.comment: for ln in r.comment.split('\n'): xprint(" %s", ln) elif cf_verbose > 0 and r.comment: cm = repr(r.comment) if cm[0] == 'u': cm = cm[1:] xprint(" comment=%s", cm) # process for n in r.namelist(): inf = r.getinfo(n) if inf.isdir(): continue if cf_verbose == 1: show_item(inf) if cf_test_read: test_read(r, inf) if cf_extract: r.extractall() for inf in r.infolist(): r.extract(inf) if cf_test_unrar: r.testrar() def test(fn, psw): """Process one archive with error handling. """ try: test_real(fn, psw) except rf.NeedFirstVolume: xprint(" --- %s is middle part of multi-vol archive ---", fn) except rf.Error: exc, msg, tb = sys.exc_info() xprint("\n *** %s: %s ***\n", exc.__name__, msg) del tb except IOError: exc, msg, tb = sys.exc_info() xprint("\n *** %s: %s ***\n", exc.__name__, msg) del tb def main(): """Program entry point. """ global cf_verbose, cf_show_comment, cf_charset global cf_extract, cf_test_read, cf_test_unrar global cf_test_memory psw = None # parse args try: opts, args = getopt.getopt(sys.argv[1:], 'p:C:hvcxtRM') except getopt.error as ex: print(str(ex), file=sys.stderr) sys.exit(1) for o, v in opts: if o == '-p': psw = v elif o == '-h': xprint(usage) return elif o == '-v': cf_verbose += 1 elif o == '-c': cf_show_comment = 1 elif o == '-x': cf_extract = 1 elif o == '-t': cf_test_read += 1 elif o == '-T': cf_test_unrar = 1 elif o == '-M': cf_test_memory = 1 elif o == '-C': cf_charset = v else: raise Exception("unhandled switch: " + o) args2 = [] for a in args: if a[0] == "@": for ln in open(a[1:], 'r'): fn = ln[:-1] args2.append(fn) else: args2.append(a) args = args2 if not args: xprint(usage) # pypy .readinto()+memoryview() is buggy #if cf_test_read > 1 and hasattr(sys, 'pypy_version_info'): # cf_test_read = 1 for fn in args: test(fn, psw) if __name__ == '__main__': try: main() except KeyboardInterrupt: pass rarfile-3.1/test/0000755000175000017500000000000013537441230012064 5ustar hlehlerarfile-3.1/test/test_api.py0000644000175000017500000001672113537436314014264 0ustar hlehle"""API tests. """ import io import os import pytest import rarfile if rarfile._have_pathlib: from pathlib import Path # # test start # def test_bad_arc_mode_w(): with pytest.raises(NotImplementedError): rarfile.RarFile('test/files/rar3-comment-plain.rar', 'w') def test_bad_arc_mode_rb(): with pytest.raises(NotImplementedError): rarfile.RarFile('test/files/rar3-comment-plain.rar', 'rb') def test_bad_errs(): with pytest.raises(ValueError): rarfile.RarFile('test/files/rar3-comment-plain.rar', 'r', errors='foo') def test_bad_open_mode_w(): rf = rarfile.RarFile('test/files/rar3-comment-plain.rar') with pytest.raises(NotImplementedError): rf.open('qwe', 'w') def test_bad_open_psw(): rf = rarfile.RarFile('test/files/rar3-comment-psw.rar') with pytest.raises(rarfile.PasswordRequired): rf.open('file1.txt') def test_bad_filelike(): with pytest.raises(ValueError): rarfile.is_rarfile(bytearray(10)) def test_open_psw_late_rar3(): rf = rarfile.RarFile('test/files/rar3-comment-psw.rar') d1 = rf.open('file1.txt', 'r', 'password').read() d2 = rf.open('file1.txt', 'r', u'password').read() assert d1 == d2 def test_open_psw_late_rar5(): rf = rarfile.RarFile('test/files/rar5-psw.rar') rf.open('stest1.txt', 'r', 'password').read() rf.open('stest1.txt', 'r', u'password').read() if rarfile._have_pathlib: def test_open_pathlib_path(): rf = rarfile.RarFile('test/files/rar5-psw.rar') rf.open(Path('stest1.txt'), 'r', 'password').read() def test_read_psw_late_rar3(): rf = rarfile.RarFile('test/files/rar3-comment-psw.rar') rf.read('file1.txt', 'password') rf.read('file1.txt', u'password') def test_read_psw_late_rar5(): rf = rarfile.RarFile('test/files/rar5-psw.rar') rf.read('stest1.txt', 'password') rf.read('stest1.txt', u'password') def test_open_psw_late(): rf = rarfile.RarFile('test/files/rar5-psw.rar') with pytest.raises(rarfile.BadRarFile): rf.read('stest1.txt', 'password222') if rarfile._have_pathlib: def test_create_from_pathlib_path(): # Make sure we can open both relative and absolute Paths rarfile.RarFile(Path('test/files/rar5-psw.rar')) rarfile.RarFile(Path('test/files/rar5-psw.rar').resolve()) def test_detection(): assert rarfile.is_rarfile('test/files/ctime4.rar.exp') is False assert rarfile.is_rarfile('test/files/ctime4.rar') is True assert rarfile.is_rarfile('test/files/rar5-crc.rar') is True if rarfile._have_pathlib: assert rarfile.is_rarfile(Path('test/files/rar5-crc.rar')) is True def test_signature_error(): with pytest.raises(rarfile.BadRarFile): rarfile.RarFile('test/files/ctime4.rar.exp') def test_signature_error_mem(): data = io.BytesIO(b'x'*40) with pytest.raises(rarfile.BadRarFile): rarfile.RarFile(data) def test_with(): with rarfile.RarFile('test/files/rar5-crc.rar') as rf: data = rf.read('stest1.txt') with rf.open('stest1.txt') as f: dst = io.BytesIO() while 1: buf = f.read(7) if not buf: break dst.write(buf) assert dst.getvalue() == data def test_readline(): def load_readline(rf, fn): with rf.open(fn) as f: tr = io.TextIOWrapper(io.BufferedReader(f)) res = [] while 1: ln = tr.readline() if not ln: break res.append(ln) return res rf = rarfile.RarFile('test/files/seektest.rar') v1 = load_readline(rf, 'stest1.txt') v2 = load_readline(rf, 'stest2.txt') assert len(v1) == 512 assert v1 == v2 def test_printdir(capsys): rf = rarfile.RarFile('test/files/seektest.rar') rf.printdir() res = capsys.readouterr() assert res.out == u'stest1.txt\nstest2.txt\n' def test_testrar(): rf = rarfile.RarFile('test/files/seektest.rar') rf.testrar() def test_testrar_mem(): arc = open('test/files/seektest.rar', 'rb').read() rf = rarfile.RarFile(io.BytesIO(arc)) rf.testrar() def test_extract(tmp_path): ex1 = tmp_path / "extract1" ex2 = tmp_path / "extract2" ex3 = tmp_path / "extract3" os.makedirs(str(ex1)) os.makedirs(str(ex2)) os.makedirs(str(ex3)) rf = rarfile.RarFile('test/files/seektest.rar') rf.extractall(str(ex1)) assert os.path.isfile(str(ex1 / 'stest1.txt')) is True assert os.path.isfile(str(ex1 / 'stest2.txt')) is True rf.extract('stest1.txt', str(ex2)) assert os.path.isfile(str(ex2 / 'stest1.txt')) is True assert os.path.isfile(str(ex2 / 'stest2.txt')) is False inf = rf.getinfo('stest2.txt') rf.extract(inf, str(ex3)) assert os.path.isfile(str(ex3 / 'stest1.txt')) is False assert os.path.isfile(str(ex3 / 'stest2.txt')) is True rf.extractall(str(ex2), ['stest1.txt']) assert os.path.isfile(str(ex2 / 'stest1.txt')) is True rf.extractall(str(ex3), [rf.getinfo('stest2.txt')]) assert os.path.isfile(str(ex3 / 'stest2.txt')) is True if rarfile._have_pathlib: ex4 = tmp_path / "extract4" os.makedirs(str(ex4)) rf.extractall(ex4) assert os.path.isfile(str(ex4 / 'stest1.txt')) is True assert os.path.isfile(str(ex4 / 'stest2.txt')) is True def test_extract_mem(tmp_path): ex1 = tmp_path / "extract11" ex2 = tmp_path / "extract22" ex3 = tmp_path / "extract33" os.makedirs(str(ex1)) os.makedirs(str(ex2)) os.makedirs(str(ex3)) arc = open('test/files/seektest.rar', 'rb').read() rf = rarfile.RarFile(io.BytesIO(arc)) rf.extractall(str(ex1)) assert os.path.isfile(str(ex1 / 'stest1.txt')) is True assert os.path.isfile(str(ex1 / 'stest2.txt')) is True rf.extract('stest1.txt', str(ex2)) assert os.path.isfile(str(ex2 / 'stest1.txt')) is True assert os.path.isfile(str(ex2 / 'stest2.txt')) is False inf = rf.getinfo('stest2.txt') rf.extract(inf, str(ex3)) assert os.path.isfile(str(ex3 / 'stest1.txt')) is False assert os.path.isfile(str(ex3 / 'stest2.txt')) is True def test_infocb(): infos = [] def info_cb(info): infos.append( (info.type, info.needs_password(), info.isdir(), info._must_disable_hack()) ) rf = rarfile.RarFile('test/files/seektest.rar', info_callback=info_cb) assert infos == [ (rarfile.RAR_BLOCK_MAIN, False, False, False), (rarfile.RAR_BLOCK_FILE, False, False, False), (rarfile.RAR_BLOCK_FILE, False, False, False), (rarfile.RAR_BLOCK_ENDARC, False, False, False)] infos = [] rf = rarfile.RarFile('test/files/rar5-solid-qo.rar', info_callback=info_cb) assert infos == [ (rarfile.RAR_BLOCK_MAIN, False, False, True), (rarfile.RAR_BLOCK_FILE, False, False, False), (rarfile.RAR_BLOCK_FILE, False, False, True), (rarfile.RAR_BLOCK_FILE, False, False, True), (rarfile.RAR_BLOCK_FILE, False, False, True), (rarfile.RAR_BLOCK_SUB, False, False, False), (rarfile.RAR_BLOCK_ENDARC, False, False, False)] def install_alt_tool(): rarfile.ORIG_UNRAR_TOOL = 'x_unrar_missing' rarfile._check_unrar_tool() def uninstall_alt_tool(): rarfile.ORIG_UNRAR_TOOL = 'unrar' rarfile._check_unrar_tool() def test_read_rar3(): with rarfile.RarFile('test/files/seektest.rar') as rf: for fn in rf.namelist(): rf.read(fn) #@with_setup(install_alt_tool, uninstall_alt_tool) def test_alt_tool(): #test_read_rar3() pass rarfile-3.1/test/test_hashing.py0000644000175000017500000000721113537423044015122 0ustar hlehle"""Hashing tests. """ from __future__ import division, print_function import hashlib from binascii import unhexlify import rarfile from rarfile import Blake2SP, CRC32Context, NoHashContext, tohex, Rar3Sha1 def test_nohash(): assert NoHashContext('').hexdigest() is None assert NoHashContext('asd').hexdigest() is None md = NoHashContext() md.update('asd') assert md.digest() is None def test_crc32(): assert CRC32Context(b'').hexdigest() == '00000000' assert CRC32Context(b'Hello').hexdigest() == 'f7d18982' assert CRC32Context(b'Bye').hexdigest() == '4f7ad7d4' md = CRC32Context() md.update(b'He') md.update(b'll') md.update(b'o') assert md.hexdigest() == 'f7d18982' def xblake2sp(xdata): data = unhexlify(xdata) md = Blake2SP() md.update(data) return md.hexdigest() def xblake2sp_slow(xdata): data = unhexlify(xdata) md = Blake2SP() buf = memoryview(data) pos = 0 while pos < len(buf): md.update(buf[pos : pos+3]) pos += 3 return md.hexdigest() if rarfile._have_blake2: def test_blake2sp(): assert Blake2SP(b'').hexdigest() == 'dd0e891776933f43c7d032b08a917e25741f8aa9a12c12e1cac8801500f2ca4f' assert Blake2SP(b'Hello').hexdigest() == '0d6bae0db99f99183d060f7994bb94b45c6490b2a0a628b8b1346ebea8ec1d66' assert xblake2sp('') == 'dd0e891776933f43c7d032b08a917e25741f8aa9a12c12e1cac8801500f2ca4f' assert xblake2sp('00') == 'a6b9eecc25227ad788c99d3f236debc8da408849e9a5178978727a81457f7239' long1 = '000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031' assert xblake2sp(long1) == '270affa6426f1a515c9b76dfc27d181fc2fd57d082a3ba2c1eef071533a6dfb7' long2 = long1 * 20 assert xblake2sp(long2) == '24a78d92592d0761a3681f32935225ca55ffb8eb16b55ab9481c89c59a985ff3' assert xblake2sp_slow(long2) == '24a78d92592d0761a3681f32935225ca55ffb8eb16b55ab9481c89c59a985ff3' def test_hmac_sha256(): assert tohex(rarfile.hmac_sha256(b'key', b'data')) == '5031fe3d989c6d1537a013fa6e739da23463fdaec3b70137d828e36ace221bd0' def test_rar3_sha1(): for n in range(0, 200): data = bytearray([i for i in range(n)]) h1 = hashlib.sha1(data).hexdigest() h2 = Rar3Sha1(data).hexdigest() assert h1 == h2 data = bytearray([(i & 255) for i in range(2000)]) x1 = hashlib.sha1() x2 = Rar3Sha1() for step in (3, 17, 67, 128, 157): pos = 0 while pos < len(data): pos2 = pos + step if pos2 > len(data): pos2 = len(data) x1.update(data[pos:pos2]) x2.update(data[pos:pos2]) assert x1.hexdigest() == x2.hexdigest() pos = pos2 def test_rar3_s2k(): exp = ('a160cb31cb262e9231c0b6fc984fbb0d', 'aa54a659fb0c359b30f353a6343fb11d') key, iv = rarfile.rar3_s2k(b'password', unhexlify('00FF00')) assert (tohex(key), tohex(iv)) == exp key, iv = rarfile.rar3_s2k(u'password', unhexlify('00FF00')) assert (tohex(key), tohex(iv)) == exp exp = ('ffff33ffaf31987c899ccc2f965a8927', 'bdff6873721b247afa4f978448a5aeef') key, iv = rarfile.rar3_s2k(u'p'*28, unhexlify('1122334455667788')) assert (tohex(key), tohex(iv)) == exp exp = ('306cafde28f1ea78c9427c3ec642c0db', '173ecdf574c0bfe9e7c23bdfd96fa435') key, iv = rarfile.rar3_s2k(u'p'*29, unhexlify('1122334455667788')) assert (tohex(key), tohex(iv)) == exp if rarfile._have_crypto: def test_pbkdf2_hmac_sha256(): assert tohex(rarfile.pbkdf2_sha256(b'password', b'salt', 100)) == \ '07e6997180cf7f12904f04100d405d34888fdf62af6d506a0ecc23b196fe99d8' rarfile-3.1/test/test_korrupt.py0000644000175000017500000000224613537423142015211 0ustar hlehle"""test corrupt file parsing. """ import glob import io import rarfile def try_read(tmpfn): try: rf = rarfile.RarFile(tmpfn, errors='strict') if rf.needs_password(): rf.setpassword('password') except rarfile.Error: return for fn in rf.namelist(): try: data = rf.read(fn) except rarfile.Error: pass def process_rar(rarfn, quick=False): data = open(rarfn, "rb").read() for n in range(len(data)): bad = data[:n] try_read(io.BytesIO(bad)) crap = b'\x00\xff\x01\x80\x7f' if quick: crap = b'\xff' for n in range(1, len(data)): for i in range(len(crap)): c = crap[i:i+1] bad = data[:n - 1] + c + data[n:] try_read(io.BytesIO(bad)) def test_corrupt_quick_rar3(): process_rar("test/files/rar3-comment-plain.rar", True) def test_corrupt_quick_rar5(): process_rar("test/files/rar5-times.rar", True) def test_corrupt_all(): test_rar_list = glob.glob('test/files/*.rar') test_rar_list = [] for rar in test_rar_list: process_rar(rar) if __name__ == '__main__': test_corrupt_quick_rar5() rarfile-3.1/test/test_seek.py0000644000175000017500000000340313537423131014424 0ustar hlehle"""Test seeking on files. """ import io import rarfile ARC = 'test/files/seektest.rar' def do_seek(f, pos, lim): ofs = pos*4 fsize = lim*4 if ofs < 0: exp = 0 elif ofs > fsize: exp = fsize else: exp = ofs f.seek(ofs) got = f.tell() assert got == exp ln = f.read(4) if got == fsize and ln: raise Exception('unexpected read') if not ln and got < fsize: raise Exception('unexpected read failure') if ln: spos = int(ln) assert spos*4 == got def run_seek(rf, fn): inf = rf.getinfo(fn) cnt = int(inf.file_size / 4) f = rf.open(fn) do_seek(f, int(cnt/2), cnt) do_seek(f, 0, cnt) for i in range(int(cnt/2)): do_seek(f, i*2, cnt) for i in range(cnt): do_seek(f, i*2 - int(cnt / 2), cnt) for i in range(cnt + 10): do_seek(f, cnt - i - 5, cnt) f.close() def run_arc(arc, desc): files = ['stest1.txt', 'stest2.txt'] rf = rarfile.RarFile(arc) for fn in files: run_seek(rf, fn) def test_seek_filename(): run_arc(ARC, "fn") def test_seek_stringio(): data = open(ARC, 'rb').read() # filelike: cStringIO try: import cStringIO run_arc(cStringIO.StringIO(data), "cStringIO") except ImportError: pass # filelike: StringIO try: import StringIO run_arc(StringIO.StringIO(data), "StringIO") except ImportError: pass def test_seek_bytesio(): # filelike: io.BytesIO, io.open() data = open(ARC, 'rb').read() run_arc(io.BytesIO(data), "io.BytesIO") def test_seek_open(): # filelike: file() run_arc(open(ARC, 'rb'), "open") def test_seek_ioopen(): # filelike: io.open() run_arc(io.open(ARC, 'rb'), "io.open") rarfile-3.1/test/run_dump_all.sh0000755000175000017500000000052513447402474015115 0ustar hlehle#! /bin/sh JAVA_OPTIONS="-Dpython.path=`pwd`/.." export JAVA_OPTIONS plist="python2.7 python3.2 python3.3 python3.4 python3.5 python3.6 pypy jython jython2.7" result=0 for py in $plist; do if which $py > /dev/null; then ./test/run_dump.sh "$py" "$py" || result=1 echo "" else echo $py not available echo "" fi done rarfile-3.1/test/files/0000755000175000017500000000000013537441230013166 5ustar hlehlerarfile-3.1/test/files/unicode2.rar0000644000175000017500000000023013447402474015406 0ustar hlehleRar!Ïs u]t ‚>SüQg†æ>0 ????????.txtØf5Ü5Üf5Ü5ÜÀ1 Š9t ‚;SüQg†æ>0 ?????????.txt}C€ù€ÿBW82;1 Ä={@rarfile-3.1/test/files/rar3-comment-plain.rar.exp0000644000175000017500000000103413447402474020104 0ustar hlehleArchive: test/files/rar3-comment-plain.rar comment='RARcomment\n' FILE: hdrlen=43 datlen=8 flags=0x9020:EXTTIME,LONG,D128 os=3:UNIX ver=29 mode=0100644 meth=3 cmp=8 dec=0 vol=0 crc=0x00000000 (0) date_time=2010-11-02 10:03:25 name=file1.txt mtime=2010-11-02T10:03:25 comment='Comment1v2\n' FILE: hdrlen=43 datlen=8 flags=0x9020:EXTTIME,LONG,D128 os=3:UNIX ver=29 mode=0100644 meth=3 cmp=8 dec=0 vol=0 crc=0x00000000 (0) date_time=2010-11-02 10:03:25 name=file2.txt mtime=2010-11-02T10:03:25 comment='Comment2v2\n' rarfile-3.1/test/files/rar5-hpsw.rar.exp0000644000175000017500000000212113447402474016322 0ustar hlehleArchive: test/files/rar5-hpsw.rar comment='RAR5 archive - hdr-password\n' R5_FILE: hdrlen=94 datlen=64 hdr_extra=60 block_flags=0x0003:EXTRA,DATA name=stest1.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=3 dict=0 solid=False os=1:UNIX mode=0100644 cmp=64 dec=2048 vol=0 crc=0xc5b7e6a2 (3317163682) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 algo=0:AES256 enc_flags=0001:CHECKVAL kdf_lg=15 kdf_count=32768 salt=a798cbfb5c85ea540a42d4d4c2872790 iv=ef62e5dedb427780eb0de68de9c00a88 checkval=1d29a48fc21e63ea4a5f40d3 R5_FILE: hdrlen=110 datlen=2048 hdr_extra=76 block_flags=0x0003:EXTRA,DATA name=stest2.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=0 dict=0 solid=False os=1:UNIX mode=0100644 cmp=2048 dec=2048 vol=0 crc=0xc5b7e6a2 (3317163682) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 ctime=2016-05-22T09:12:33+00:00 atime=2016-05-22T09:12:37+00:00 algo=0:AES256 enc_flags=0001:CHECKVAL kdf_lg=15 kdf_count=32768 salt=a798cbfb5c85ea540a42d4d4c2872790 iv=0c41c02fa9c09e63bb0dda405e7f10b8 checkval=1d29a48fc21e63ea4a5f40d3 rarfile-3.1/test/files/rar3-comment-psw.rar.exp0000644000175000017500000000107213447402474017614 0ustar hlehleArchive: test/files/rar3-comment-psw.rar comment='RARcomment\n' FILE: hdrlen=51 datlen=16 flags=0x9424:PASSWORD,SALT,EXTTIME,LONG,D128 os=3:UNIX ver=29 mode=0100644 meth=3 cmp=16 dec=0 vol=0 crc=0x00000000 (0) date_time=2010-11-02 10:03:25 name=file1.txt mtime=2010-11-02T10:03:25 comment='Comment1v2\n' FILE: hdrlen=51 datlen=16 flags=0x9424:PASSWORD,SALT,EXTTIME,LONG,D128 os=3:UNIX ver=29 mode=0100644 meth=3 cmp=16 dec=0 vol=0 crc=0x00000000 (0) date_time=2010-11-02 10:03:25 name=file2.txt mtime=2010-11-02T10:03:25 comment='Comment2v2\n' rarfile-3.1/test/files/rar3-vols.part1.rar.exp0000644000175000017500000000102413447402474017351 0ustar hlehleArchive: test/files/rar3-vols.part1.rar FILE: hdrlen=50 datlen=102310 flags=0x9022:SPLIT_AFTER,EXTTIME,LONG,D128 os=3:UNIX ver=20 mode=0100664 meth=0 cmp=205000 dec=205000 vol=0 crc=0x509ad74c (1352324940) date_time=2016-05-24 11:42:37 name=vols/bigfile.txt mtime=2016-05-24T11:42:37 FILE: hdrlen=52 datlen=2050 flags=0x9020:EXTTIME,LONG,D128 os=3:UNIX ver=20 mode=0100664 meth=0 cmp=2050 dec=2050 vol=2 crc=0xd08a1f86 (3498712966) date_time=2016-05-24 11:42:43 name=vols/smallfile.txt mtime=2016-05-24T11:42:43 rarfile-3.1/test/files/rar5-vols.part2.rar0000644000175000017500000031000013447402474016556 0ustar hlehleRar!»ºlí  ü†€Æ‚†€þ:‡(¸ÈÁ ´ƒýDW¶Ì ¹€vols/bigfile.txt 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 lk*··€QOÞ‹Ã2å-þ:‡(¸ÈÁ ´ƒýDW¶Ì ¹€vols/bigfile.txt’Ã6„„€RR{RB},º€´æß°…BHŽNúBa“œñu zkZ§®ºk4=ãE¾Ê‘¤:(¸U)TäxÃi8µÇM3 2ºQ Wt°É¾šÝó’ä ÷€]8<gŽ>ë€ÿµÑã‚-{ ¥è‰8¢7^+7Šç“xìB´ˆUç׌aç„w|€ÎÈn›`^Ъ§ÈgB÷ Dk®£G‹ç¦gƒƒèà&* r Ö—™°ô‡ð€«Â,:=ÀA—G€¶|(v·'þ’Mq~áåà}˰æGÒ¼'¡¢üÙÀyÍ<¥‰¾@á^äA©º7VFáÙßýȺֻ®“ÖåSËÒ²gÚ|Ô†*£¹‘MM¼¡ZsÐó8°ÔvÒóÔÜ´ui y°5ÇÎ&;aO2= §ßÄøÌ_®ŽTªî/Ð%qP©×2Å2½è]q7.x—´ÌøÆ2Vøì…ÙÙþu°oU¦'¼BøÄjMûðá§& nÐÞë…÷äd%—en¢ÁFVfuùï¼òm4kÌ£Á¨6‚eû®`â£déî›yÿ«{€‚H¿÷Ëyj£lD‰sd.æ$™“\µ›î"­ú,‹í皆;}m9ú·÷–×+Bø+¦éÍPe®lI­‚ð ò ]66Ð òu^vÑËçØáQ­®ø9üåAC%ÂNÒß(»L¹ìV²œÑÉÏŒ=dÔŒU0RØÛ^Ble¤eÇ-—iÏ›‰ÏšÊÿ0a¡¹C9ñAÔ5ÃRDhD*ïÒæÐd'å»þ_žïS…¹£ Á ùÿú}òâê7sªÂ[ÚƒY¡]ðà¾LÝ ^G&±ï-ñPQ„`U©=j蜆W¿µ­¢¢2uxâT?’Ø XÙt¾Ÿm·Œ|«¡_-¿XRðƒ•"kË|åcö…µóàjúÀ_cÏæÌª†3ÇiËÕñˆ†^b¾F#|ñãìg<޾$Ç»*ÒFð!NQ”©”¹§€9”3xøà‰®ü,ígŽ>ë€ÿµÑã‚-{ ¥è‰8¢7^+7Šç“xìB´ˆUç׌aç„w|€ÎÈn›`^Ъ§ÈgB÷ Dk®£G‹ç¦gƒƒèà&* r Ö—™°ô‡ð€«Â,:=ÀA—G€¶|(v·'þ’Mq~áåà}˰æGÒ¼'¡¢üÙÀyÍ<¥‰¾@á^äA©º7VFáÙßýȺֻ®“ÖåSËÒ²gÚ|Ô†*£¹‘MM¼¡ZsÐó8Gœâ!„ô‰ ±q:Ï&C=”¦¦Ÿª±/¢I1¯"!.›bºç±é† d¾Ç·’j½|þ\´ÒÇ }`ê]½öþR3áX2o€œ$`ÛPHOë6®búk¨¤6†DÙTÑo”2ç·]¼„8qŒº\ ÃÉyV ÃÂËgeÛ¾ÀWH\Äç’’æ_Ÿ@´bƒš¿á|ëU¶(ÜL£h­ð"ÒÈ;®~k€#ø›pÈ5}ðÔŠã…ÿžg®*/Ë‚´<׿ˆ#8îß¼‘òHM£ƒÿF‚Š ¤_õ.…þø«%îï:à/ˆ5Þ¨þã©·IŒ{ÕÄ¢]I}eõ×,ƒè)øïÅ þÜ¥+j{"~¸\Ÿ‰‰¨báøçÝÿ"µ|àND+°#Êd‚ð½ØÍ * S|y‡õ§2MnŸ;ÆüdFËð:uþ5ÞGÌÌ­clÜBJÊ5A®Q‡´Nåê¤ßX‹PõU™âÚ“.çŠn‰ß#p|Ľ«HXW´ Š%Bå ˆsèûpÉh–¥ûvÌ35)i ÑŸdÃ\S¸Zln_< NB笅c; £2­Îçø 5¼¿©ÇÔ”ÓÚWœ:R|4‡|^÷õÅT×­;üKx{}úL¡è).âÝd‘ÃãY8ŒÍâ.X& WeÚŽÔ* n:2™¯_¼™‚±‚nV¾KŠ·!jÇñ‡ìæÂŸ]lêHŸ®.Ïö4% ìë« Û¾­¶£ÝëæÆ$)I˜z”/µèp1ÍBs×£Ö§-¨c£]úôƒ@=4Y±ìÊz– ƒS0"Áçˆc7[1M­nØËų¾ˆÃFiq<óô°©¢Ì`*{ ›Â²/ذƒbÑ\˜ (¦> ¦ªe· ‡YÙJ{ê 0øHOöËÓ³²ØŒ4YcÒ„ÅùÍÈ‹·¥fïä$gsÚÙgÀ(M]*líHaYµßÙH"ÒÖE`~òÑ#¢_Q·‡ÀÀêgðX èZ?“t´}”ÞÊêa ê>,ÏXr8;Ë 9œt«‘jk š—n¹n€¬)®Tô#ÄËåÀ‘5ŸäxA Ú*˜°m 5š‰4_ &ˆ'î_Nv¥ù´¦–^ ¡Â˜ÙÑÚq¹ö®ð^܇“öәĘÀrs Ö‹õúiUë^‘Ÿš rÙö _ñ_üFÈ“b 5 ¯4_tÖˆ'î_L2¥úD¦¢Ÿ ¡Â˜ðÕé=Âö®¦'ÜÂΪöÓ™Ä,rpg ÖËõúiúRë^‘Ÿ–Z ryìK _ßÿÿÈ•óö 5¼Ä4_ 'ˆ'î_KþúUû´’Ï=^ ¡Â˜9 é<¬oö®ñwÜÂðMöÓ™Äð[rr Ö ôúi£ë^8þ”: rê_n _ßÿýFÈ—W… 5/â4_ðbˆ'î_HºúUüD’Ï^Î ¡Å_€Œé?Òö®‡ÜÂ\ØöÓ™ÄDKêuï Ö_úi¡ë^8þ‘ª rïÁ° _ßÿû¶È™ Ï 5Ö4_‰’ˆ'^IºúUþD’Ïðn ¡Å_©Ké>p¹ö®_×ÜÅkMöÓ™ÄCæKêv— ÖN_úiúPë^8þ• rës·! _ßÿùæQâ» 5ôâ4_ ’ˆ'^NvúUù´’Ï“þ ¡Å_Ùé9q¹ö®ñvÜÅUªöÓFy˜ÀKês ÖŽ_úi¥ë^8þš rîí—nà _ßÿüFQàb 5gÄ4_pbˆ'^L2úUúD’ϧ? ¡Å_ðÕcÂö®¡ÿÜÅ“öÓFy,Kêpg ÖÎ_üžýRëw 6]>lçunYýkAé¼ÚË3󕦕Ú4Nÿ•4R5aÉÏeÉahüò­ ¡Å_9 b¬oö®ö¯ÜÅ"töÓFyð[Kêr Ö^‘ ]ô® 1‹Ê rRs—Ù¨ _¯ýFQäW… 5A‰4_ö®ˆ'^H¶ ] ]’Ï®ç ¡Ç€ŒaÒö®_ÜÅŽáöÓFyD ëuï Ö±‘ ]ô®õÀŽZ rWí— _¯û¶Qê Ï 5¸x4_^ˆ'.^I¶ ] ]’ÏG ¡Ç©K`p¹ö®XÜÄ–À¤ÿmÅ-}V·œöh/°/,›™<ñëá5¤ÑƒÐ¸Ð¸Ð¾Ð¾Ñ‚ивл.txt§0Ø÷ß#ñ¿ˆgö©ÿÔöt€4 SüQg†æ>5¤ð€ððð‚.txt‡­wƒ¿ˆgö©ÿÔÄ={@rarfile-3.1/test/files/rar5-hpsw.rar0000644000175000017500000000503613447402474015537 0ustar hlehleRar!¯õiE!§˜Ëû\…êT BÔÔ‡')¤ÂcêJ_@Ó\RÕMÎ'º;còª¹&ô!Õ /°DÖ Ê{¯vº#þÒ:z®Ö ¿Ê´[«2÷X cÿ´ŸUjãš™ò«®®xùuËÏôßw§@®Õ{ÍÉΪ àÒûC²QÒç´ƒTh¼Šê-Ì¥_QþèáoCmš2šyŸ(0ú¯5:D÷§mÈø"µJà‚ Fø Á©ÿ×U©ì²Qùa14î¨Ô§úôïQIÉóÐ*W"þÎÓ©Ó½Fγvþ‹$·˜Ky‹ìçgçN¯Ôå}ÿŠ? æw Èb!ç_Z1¤÷· €"„ÿš)ümvêí@Ç@A­ Â4 )I[—„_A 7zuT 㪮U”éfarÙxmѪ¹Âø÷û?‚«Ÿ ê\jêÒ1é?]±‹íÑ…÷Õöá )lqý†t8L=J½”fIC Bè‘õ©Ú{9EÊôƒÁŸ^¨ U”c‹è>™ÿAFù¹J°¥«¦ŒÙÜÇ‘'I !\åPÊeþN^jvÒI*ÙêJ»¨-„+¼QymÆÑˆ56míÂò¯ ? ?5†¨\`s×®÷ÂYh@ƒžïyçµ7ª?¿&ÈÖO‰Øl’ž<= †®3>zî Œyˆ€²åѰ«ñÊ£DãGÓ¢Ãçyêè´èâòu2¡ú“ë]NʺbµZ0 Íþò”|ßK«ñ‘o" ôf ǵœj7xÕ™?d|øŸÚØ pGÜ$µJ¹ãÄ'KÜ]4apër7׉w ÓL¼ZTµ¼ÛøÈHë]KÅ[*ýŸ¯Ã|¡å³^{E}„p¦£7,:ÎáJ‚*‰MaxR ÃM²óJ½gk²ïŸM<`3˜Êp„Fzì(—»´a¾NÇ–2ºKyMQ¼Î+A1#gô˜³r®©¡e×[Ñ~Ìäò5º ‹ùD ü¤x§h•=Í=F.Þ™3Ê9­ýCOïß›~ØMH"£4äÇ8áÙi-Ü'Äýÿ`TT NŸæn] ÊpˆËÅŒ¹*]—ߨP‡DHt-'Ÿ=ÜŠ5‡¥q —9d°z€f·ºùc¿d›³¦oº3äu©°´ÿÃÐmêBQ/cãïa½NXÕƒfG¿2⼸Š4þ)|},ác¿¦.p7ÚP×@ÜoªÆkóDÈéÄRtO~6¢@}¦ cúlç wþMЦÙ$°¬ªÅ[v©PÜpÀÑp°C4c‚Á” ™iZõˆšQ[¡5@ò“FPÌuæÉñ ¼zl·T á5*9­z1S£TúŸî½B~¶ü7t™#¯‚‰ÆÏg¹pt6÷ŸA?ùúÄè®vבWÛ[R5ë‹ä„´AK>hÕå\|@Rl¬—oGHêü±N%ìñ+ÌMW¨ÙûIt‡¤ä9æ‰ë±•\ë<‡Ç?Å+³|Y»îxvèF³AC{p Ïo“Æì\›)1¾ÄyÓQ ýúª<øÖ7žze"NHÜÍ!žYv=æ=¢ð›‰JéþS‘©0ËY†¸`ñ–ðeµËß¾@O-ôÓ3i½–'Î^ ïA’÷^+ÆVY;uX.[­s¦îÌ[4U\’J‰àî0\º³¡3l:oíº*"ÓÖl¨”>‚›B Î’¿‰âÄÖ:‚ŒMà&/5~]Y¦€þp&Üô6™ó2 ¥Wb ÷§Ë9.‰/ƒ³·i¬ŒI’lÀl‰;¿Wøé}z~ÞC×nb´œÅ”.»s°î¸í:€E©DWymà—nú™âv¸:àüçõ ¦·+/)Ÿ©¾?Ñôƒ(]ø tTͦ& ³þÇýŸ7ÒLLª†YØ@§`†! ³õ)2—òSÅþV ?û uIrëªmN†ÃG¯ž•ÿŠ´ ÄÖ«½¡>“–RÕÍRÉ`7-iÅVõ_ß“û­Y„NÿQI©³¾|SÍ!ÂÌv´£Ne?]—˜©RÙÍûÙr{U¤6õ>\û…lT1 -Ö7îÒp™†.ÞPï#bI*átc$îv}ìcJøgy‰'sÁΕ^‘‰ç€S=4µ!¸ÝZ\¥»’¼Ù·ïû§Udí58cÿ«ÔYâxü÷‡J„'—ÅóÔ°ÍèÃÁœÐ˜)#ÿÓÖ×U>M”õîØøºP<¤ Á Úüðš¦;­ú–êÛ)rè¼e8û+õæLB*`tüòáNkÃ×7þÖÛ7ªI)9 ‚îÈëq‚¶È3œß m™7@$XÙí´4v0:¢ëáMeS 2oÌ}þGvâ´(·«pÔ cqvac1b¾Ú&¿R¼m}[+Л ­ö3d®#©©Xñ>“?o²I¼f—lvXí,Ôã*Kùõ¶Ib´Àš2—݈‡¦@tü¬÷»ÆÐד€.¼Ï^öJ”z» -”ñqñò“.í"A” ŸŽÖjN6*»³—»Üøü1^Ð-˜™l”kyAJþLÕòt¬¹mÖò5שbHh%–IYõ´æz" ø“Í% 6 e´"í´pÎ+PKɆu"9÷X&;zÈQ·¬kÞ?¢ê9ôUñèù¢Øn*xå•wmNf5. ÊwBÔvÿ›§nv]«´‰Ô«9®î2¨4!XOšWã¢ÍŠB*›` ÈV\àï…. avžé—ŸœCÉsóšq°¡áE] åáÅ>žŠ Ü›>ƒ` ¼V³›S¥à?5ð/ à˜¤ê;tÙr-)FÃۘυ"O)þ ¨/¬Ä<¥} ùÒávB™?‚iÏFȃԪb¢5ø¢¢cB ‘«À«•“Åk.´ öÜÓà›ú˜|T¾ÎŸ¾tÍ~ôšySpöÊìþX[-§MĤ5‡Ûºí²z9$ÜTôwnõÕfrQfæsç¼0 afile.txtý«:‰—«ª>‰Ä={@rarfile-3.1/test/files/rar5-psw.rar0000644000175000017500000000454313447402474015371 0ustar hlehleRar!óá‚ë €€€ÖfžnŸŸ"C~©€CMTRAR5 archive - nohdr-password ˜›ÙŽY<À€¤ƒêî(º€ stest1.txt0~˜,Ýâ6Ç£‘ÚŠh :­&ô‚{‡ÕLr\ç;igQÏö6IÁnj" €Ì —æ(Ìo\䊻‰d[mšô2ÊLH.hü~E‡_>É‘!‘À^]¬²)¢SìM¡bes¿+ÕAHT›R7ßuƒ:üÐiL€€¤ƒêî(º€ stest2.txt0~˜,Ýâ6Ç£‘ÚŠh߃ú Ønˆ¸¶øQF}yIÒQÏö6IÁnj"€Ì —æ(̀㠴рpE ´ÑIÑ8q¼âeCW¥%hvšÍÁ…Ó0):ˆ¿gœˆÚ©`œÍŽù¯7ZöÐcäç{ /žü¡rC›~H@Q‘ Ó/a±‘Tm/aþæŽÅ p¯v­25›ª‡Bß1,õí)Û*ß€Ä \¼í™ùƒ1o<%}ƒz½w5gŒ…uÌCyžÈÆì“hÆV°Ø"AðÅ„ÆÀÊÌHk,úÝO©z áf«Œoü$X"àÅ—Oßáâׇrð‡}ܛǦÙÍpúAÈø°Á9[Š6ûÈì_÷$A‘ ‡–ˆ»sB9¼q“7a®·®¼G ‚×ç ñzCß·¡U§¤››ÿ ˆÅt¶c{Ñm Ò+QÅg NDH‘tÁ©äô„aqÕëôù„R~廂ÈZ×ËDl…Éç?@’1íÌ-Û!I* |ËV}ÿ{×4ÒƒB`]gúâCúŒœ¸­Zz­“1œÀɤ 9ƒ`êè·ñù^c³ :wL†òBæ&'O”eÚN!† ¹]ó‹j‹XÓåÆ{)øÀî#Ó‰j;£ñqÖšåÑzRm½ˆT]©Èô_»;snã¶Rª¶ ©€ÃˆŽtdx;gS·šüö|ª!Ñw@½à³èà/¿.RS¹#DýÏî·¤j£p Mµa§ïÕ}Å9í-J´³à@œ%UòÞ†¦hjX*¯Ô›üWnÒ‹|¤t× ›+™!Ç´oi,ªü+yQ;­§ä UÉFPÔµÂj9­«ûÙòôs*qÂd¢ÕúPÂ}íò¯ ž[î鮦»âÔ ié³ÝËÉøgácò&S[6&‰zÕ_¦'ˆàouŒ³ŠÄ´Qír…šZSÖPÝD/s+žf­cÐG²LÃþSúèÈN™Ël!Ž)ÿÔñª²¶þA²DlºjÐÉ…<$±OნÎ×,I‰‚â™ú/]ö2O 튵¬UÿÜß_j^öÇÉ6òüÎsÂ##«°±Œ1UxüGBÚÚ–ëÔº^ uŽ“‹2Ï…æãPç ¥+Û3ƒ³ ­I1 ­Ð7W}Pˆ*ƒ+ÞESä–€8NTp ÑcÕt±¢0à"½¯D øÁÒ’g¼»Rp‡$}¤’¥² ˜¢ð­€‚G¥ b—2‡ølz]# w5=°Üð¾)'mÞÎd5÷š½.!'tœ“S6»é_&¤Z"§_ö X«¤Åï³4¶˜ ”:Ä ªÂÚá.Ê `\>&‚Þë9ANùÆO(“|V 8ß©GF,EÂE7|d;iÙ4ëèŸÚ?yÛ°ð5ÃY+m·P¾‡“~YÖEÿÌõsÂÝøÆ,k£l^İ6€a¨¤}¡€â·Èç¦]U]¦ç*jq:¢2£;ŠóN'Bý½yÁ%Ð>;,o;QK™Ç…b8‡ÿn¥@£:BH'ãhššCcàEz!3 ›Á­¹Û1!S0š?#‘ÈQø¾ ê° @^› l´|‘»ÐÜ,ÕšTE…&&~f‡·ÛüìïÊšRè™fèXÖrxÔ퇜t•x<çd§n,û% ŽZR¸˜ò¾›e#± ªc€c_n£Æº=1õcCÀ½CÿL^÷̬£Qù¢s½壚©šÌ£ Ž‘ð%9b;ã&_ò-06 ر™~s´7ȲýŒ@HÕuWL%¼pË‚v3õêóa7‡¥Õq¤,‰Y8§i‰ÖÙüF ‹“lŠw–>!sª§ýAÚž¨T¨{1ÒŽM%Ù"Ë‘?†)Ðrj†<Œ™?q>$¬ Ñÿ§‹ŸK¤MCgNñ´¸ ×®›a3Lã8'ÝÐ3oe½B:)G*@ø¹p2ÙFÃàYþ$.œ½%Øü‡.†^ hˆ1INÍmVÒ[pín Y3In§WÙä.®¸¶áC[`WÕHv;ÈÚ!aû䀄Xz`‹‡e¥÷-Bm( ©í]]ø7nÅ]å­ß…V+ÞÌïŸ›Õ ³&_[2§6 Ä#ñR·9´D/ßfQ<ÉöÁÌý‹˜`õEòm5Ï1¶ÑhòÓ»ï8ó×z4nĵ7É{oB}Œ ]=÷µI¤ˆkOc1aåŒÒÐX<„GwpŸ‹A;°¤ÁûӀ޲¨ÇN_Àì;U©­‡%^¹\«ïâR–ýæõ!ã_TšDWGÆß$Ñè-ç;¯lá -Ñ:¤h×P`h_¿N«tb%£¿޾t<¨%U2Ú©Z­¶êÿÉãÏ6pÇ„]6š>JËÈpTå *øëŠ÷´éwôñ¦p‚¨GÂVü˃àPz´Î;Ê©ö­NÝ 9¦ A4iîcdÄ™V="Ó¥‹¬ßMÔý)Ø~J?í%az5áßåÞæëµôÆ-ªŸq4Z££äUÃa‡ dˆY0Î¥‰ù–ÄO…&©CZ;æPÛª¾R½gÝÔ\ ÛàÚ‘"ë*ßk •üm‚ggTÃN·I÷7óÇ»çåw{øBXpRÜLÉÊjG/wØß7h㞸 ,È™ºSƒ;„GË»¨q˜§ñ[¹›©ü>G¶æ²JÙÀà‡3ÕgŽ£}»Û“ö]ýŠ#áˆt1D~¡5CWf#Vˆua<ößãñ·v.ÆtÇË‘µY× $+Raã›Ê°¿ºBwVQrarfile-3.1/test/files/rar5-vols.part3.rar.exp0000644000175000017500000000016413447402474017361 0ustar hlehleArchive: test/files/rar5-vols.part3.rar --- test/files/rar5-vols.part3.rar is middle part of multi-vol archive --- rarfile-3.1/test/files/unicode.rar.exp0000644000175000017500000000066413447402474016132 0ustar hlehleArchive: test/files/unicode.rar FILE: hdrlen=54 datlen=17 flags=0x8080:LONG,D1024 os=3:UNIX ver=29 mode=0100644 meth=5 cmp=17 dec=2 vol=0 crc=0x6751fc53 (1733426259) date_time=2011-07-06 16:48:04 name=уииоотивл.txt FILE: hdrlen=52 datlen=13 flags=0x8090:SOLID,LONG,D1024 os=3:UNIX ver=29 mode=0100644 meth=5 cmp=13 dec=2 vol=0 crc=0x6751fc53 (1733426259) date_time=2011-07-06 16:48:04 name=ð€ððð‚.txt rarfile-3.1/test/files/unicode2.rar.exp0000644000175000017500000000066113447402474016211 0ustar hlehleArchive: test/files/unicode2.rar FILE: hdrlen=62 datlen=2 flags=0x8220:UNICODE,LONG,D128 os=2:WIN ver=29 mode=0x20 meth=0 cmp=2 dec=2 vol=0 crc=0x6751fc53 (1733426259) date_time=2011-07-06 16:48:04 name=ð€ððð‚.txt FILE: hdrlen=59 datlen=2 flags=0x8220:UNICODE,LONG,D128 os=2:WIN ver=29 mode=0x20 meth=0 cmp=2 dec=2 vol=0 crc=0x6751fc53 (1733426259) date_time=2011-07-06 16:48:04 name=уииоотивл.txt rarfile-3.1/test/files/rar5-psw-blake.rar.exp0000644000175000017500000000230413447402474017231 0ustar hlehleArchive: test/files/rar5-psw-blake.rar comment='RAR5 archive - nohdr-password-blake\n' R5_FILE: hdrlen=125 datlen=64 hdr_extra=95 block_flags=0x0003:EXTRA,DATA name=stest1.txt file_flags=0x0000:- cmp_algo=0 cmp_meth=3 dict=0 solid=False os=1:UNIX mode=0100644 cmp=64 dec=2048 vol=0 blake2sp=5cdbd3f49f594a35edb63c923b64abdadba3bf1468b6259ee1e1c54ba2f0d65e date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 algo=0:AES256 enc_flags=0003:CHECKVAL,TWEAKED kdf_lg=15 kdf_count=32768 salt=9db5988f74a009519a4073bdfda0e046 iv=4209dcd38ab7be9299ab3e74d3abc760 checkval=3978909499ddfdb80dfc899e R5_FILE: hdrlen=142 datlen=2048 hdr_extra=111 block_flags=0x0003:EXTRA,DATA name=stest2.txt file_flags=0x0000:- cmp_algo=0 cmp_meth=0 dict=0 solid=False os=1:UNIX mode=0100644 cmp=2048 dec=2048 vol=0 blake2sp=5cdbd3f49f594a35edb63c923b64abdadba3bf1468b6259ee1e1c54ba2f0d65e date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 ctime=2016-05-22T09:12:33+00:00 atime=2016-05-22T09:12:37+00:00 algo=0:AES256 enc_flags=0003:CHECKVAL,TWEAKED kdf_lg=15 kdf_count=32768 salt=9db5988f74a009519a4073bdfda0e046 iv=e420cdee55a90d84a6341ba90d41d6e0 checkval=3978909499ddfdb80dfc899e rarfile-3.1/test/files/rar15-comment.rar0000644000175000017500000000032213447402474016272 0ustar hlehleRar!:"s,°bu4òÐ’å£õþ´J]íá4@–t€H©â0žc=3 FILE1.TXT´Üu0«±file1comment -----Ózð€œßt€H÷C<3žc=0 FILE2.TXT'u0p”file2comment -----baaaar rarfile-3.1/test/files/rar5-blake.rar.exp0000644000175000017500000000150213447402474016421 0ustar hlehleArchive: test/files/rar5-blake.rar comment='RAR5 archive - blake\n' R5_FILE: hdrlen=76 datlen=55 hdr_extra=46 block_flags=0x0003:EXTRA,DATA name=stest1.txt file_flags=0x0000:- cmp_algo=0 cmp_meth=3 dict=0 solid=False os=1:UNIX mode=0100644 cmp=55 dec=2048 vol=0 blake2sp=7cd5c1ac31f0cf58844a57fb9072c44768dbea1456e37c21e491f4853982ede0 date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 R5_FILE: hdrlen=92 datlen=2048 hdr_extra=62 block_flags=0x0003:EXTRA,DATA name=stest2.txt file_flags=0x0000:- cmp_algo=0 cmp_meth=0 dict=0 solid=False os=1:UNIX mode=0100644 cmp=2048 dec=2048 vol=0 blake2sp=7cd5c1ac31f0cf58844a57fb9072c44768dbea1456e37c21e491f4853982ede0 date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 ctime=2016-05-22T09:12:33+00:00 atime=2016-05-22T09:12:37+00:00 rarfile-3.1/test/files/rar3-old.r010000644000175000017500000000501413447402474015144 0ustar hlehleRar!ñûs ´5t!2|È LךPR]¸H0´vols\bigfile.txtÀ 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 Xt 4†ŠÐU]¸H0´vols\smallfile.txtÀ 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 Õ{@`’crarfile-3.1/test/files/ctime1.rar.exp0000644000175000017500000000042113447402474015655 0ustar hlehleArchive: test/files/ctime1.rar FILE: hdrlen=50 datlen=0 flags=0x9020:EXTTIME,LONG,D128 os=2:WIN ver=29 mode=0x20 meth=0 cmp=0 dec=0 vol=0 crc=0x00000000 (0) date_time=2011-05-10 21:28:47 name=afile.txt mtime=2011-05-10T21:28:47.899345 ctime=2011-05-10T21:28:47 rarfile-3.1/test/files/rar3-old.r000000644000175000017500000031000013447402474015135 0ustar hlehleRar!ñûs  t#2¦È ­Pø¿R]¸H0´vols\bigfile.txtÀ 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 x]{@Ç?@Orarfile-3.1/test/files/rar5-blake.rar0000644000175000017500000000445513447402474015640 0ustar hlehleRar!óá‚ë €€€”+u––éùݾ€CMTRAR5 archive - blake fYSG.·€¤ƒ€ stest1.txt"|ÕÁ¬1ðÏX„JWûrÄGhÛêVã|!ä‘ô…9‚íà €Ì —æ(ÌĪ4D4$ú2ëGúÄM}½æ€‚ ŒÁ*•Ê"›P“Ý@ü@Ô`6íù·Tƒ*dNÍ|à‘IïcW>€€¤ƒ€ stest2.txt"|ÕÁ¬1ðÏX„JWûrÄGhÛêVã|!ä‘ô…9‚íà€Ì —æ(̀㠴рpE ´Ñ000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 069 070 071 072 073 074 075 076 077 078 079 080 081 082 083 084 085 086 087 088 089 090 091 092 093 094 095 096 097 098 099 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 wVQrarfile-3.1/test/files/ctime0.rar.exp0000644000175000017500000000036513447402474015663 0ustar hlehleArchive: test/files/ctime0.rar FILE: hdrlen=46 datlen=0 flags=0x9020:EXTTIME,LONG,D128 os=2:WIN ver=29 mode=0x20 meth=0 cmp=0 dec=0 vol=0 crc=0x00000000 (0) date_time=2011-05-10 21:28:47 name=afile.txt mtime=2011-05-10T21:28:47.899345 rarfile-3.1/test/files/rar5-dups.rar.exp0000644000175000017500000000610213447402474016317 0ustar hlehleArchive: test/files/rar5-dups.rar R5_FILE: hdrlen=43 datlen=55 hdr_extra=11 block_flags=0x0003:EXTRA,DATA name=stest1.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=3 dict=0 solid=False os=0:WINDOWS mode=0x20 cmp=55 dec=2048 vol=0 crc=0xc5b7e6a2 (3317163682) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 R5_FILE: hdrlen=58 datlen=0 hdr_extra=26 block_flags=0x0003:EXTRA,DATA name=stest2.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=0 dict=0 solid=False os=0:WINDOWS mode=0x20 cmp=0 dec=2048 vol=0 crc=0x00000000 (0) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 redir: type=FILE_COPY flags=0:- destination=stest1.txt R5_FILE: hdrlen=58 datlen=0 hdr_extra=26 block_flags=0x0003:EXTRA,DATA name=stest3.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=0 dict=0 solid=False os=0:WINDOWS mode=0x20 cmp=0 dec=2048 vol=0 crc=0x00000000 (0) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 redir: type=FILE_COPY flags=0:- destination=stest1.txt R5_FILE: hdrlen=58 datlen=0 hdr_extra=26 block_flags=0x0003:EXTRA,DATA name=stest4.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=0 dict=0 solid=False os=0:WINDOWS mode=0x20 cmp=0 dec=2048 vol=0 crc=0x00000000 (0) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 redir: type=FILE_COPY flags=0:- destination=stest1.txt R5_FILE: hdrlen=58 datlen=0 hdr_extra=26 block_flags=0x0003:EXTRA,DATA name=stest5.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=0 dict=0 solid=False os=0:WINDOWS mode=0x20 cmp=0 dec=2048 vol=0 crc=0x00000000 (0) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 redir: type=FILE_COPY flags=0:- destination=stest1.txt R5_FILE: hdrlen=58 datlen=0 hdr_extra=26 block_flags=0x0003:EXTRA,DATA name=stest6.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=0 dict=0 solid=False os=0:WINDOWS mode=0x20 cmp=0 dec=2048 vol=0 crc=0x00000000 (0) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 redir: type=FILE_COPY flags=0:- destination=stest1.txt R5_FILE: hdrlen=58 datlen=0 hdr_extra=26 block_flags=0x0003:EXTRA,DATA name=stest7.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=0 dict=0 solid=False os=0:WINDOWS mode=0x20 cmp=0 dec=2048 vol=0 crc=0x00000000 (0) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 redir: type=FILE_COPY flags=0:- destination=stest1.txt R5_FILE: hdrlen=58 datlen=0 hdr_extra=26 block_flags=0x0003:EXTRA,DATA name=stest8.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=0 dict=0 solid=False os=0:WINDOWS mode=0x20 cmp=0 dec=2048 vol=0 crc=0x00000000 (0) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 redir: type=FILE_COPY flags=0:- destination=stest1.txt R5_FILE: hdrlen=58 datlen=0 hdr_extra=26 block_flags=0x0003:EXTRA,DATA name=stest9.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=0 dict=0 solid=False os=0:WINDOWS mode=0x20 cmp=0 dec=2048 vol=0 crc=0x00000000 (0) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 redir: type=FILE_COPY flags=0:- destination=stest1.txt rarfile-3.1/test/files/rar3-old.rar.exp0000644000175000017500000000101513447402474016116 0ustar hlehleArchive: test/files/rar3-old.rar FILE: hdrlen=50 datlen=102310 flags=0x9022:SPLIT_AFTER,EXTTIME,LONG,D128 os=3:UNIX ver=20 mode=0100664 meth=0 cmp=205000 dec=205000 vol=0 crc=0x509ad74c (1352324940) date_time=2016-05-24 11:42:37 name=vols/bigfile.txt mtime=2016-05-24T11:42:37 FILE: hdrlen=52 datlen=2050 flags=0x9020:EXTTIME,LONG,D128 os=3:UNIX ver=20 mode=0100664 meth=0 cmp=2050 dec=2050 vol=2 crc=0xd08a1f86 (3498712966) date_time=2016-05-24 11:42:43 name=vols/smallfile.txt mtime=2016-05-24T11:42:43 rarfile-3.1/test/files/ctime0.rar0000644000175000017500000000011113447402474015055 0ustar hlehleRar!Ïs It .—«ª>0 afile.txtð«:‰Ä={@rarfile-3.1/test/files/rar3-comment-hpsw.rar.exp0000644000175000017500000000107313447402474017765 0ustar hlehleArchive: test/files/rar3-comment-hpsw.rar comment='RARcomment\n' FILE: hdrlen=51 datlen=16 flags=0x9424:PASSWORD,SALT,EXTTIME,LONG,D128 os=3:UNIX ver=29 mode=0100644 meth=3 cmp=16 dec=0 vol=0 crc=0x00000000 (0) date_time=2010-11-02 10:03:25 name=file1.txt mtime=2010-11-02T10:03:25 comment='Comment1v2\n' FILE: hdrlen=51 datlen=16 flags=0x9424:PASSWORD,SALT,EXTTIME,LONG,D128 os=3:UNIX ver=29 mode=0100644 meth=3 cmp=16 dec=0 vol=0 crc=0x00000000 (0) date_time=2010-11-02 10:03:25 name=file2.txt mtime=2010-11-02T10:03:25 comment='Comment2v2\n' rarfile-3.1/test/files/rar5-times2.rar0000644000175000017500000000011113447402474015746 0ustar hlehleRar!3’µå €€:sÂ% €€ € afile.txt +T6@ÌwVQrarfile-3.1/test/files/rar3-vols.part1.rar0000644000175000017500000031000013447402474016553 0ustar hlehleRar!Zns cŒt"2¦È Óg †R]¸H0´vols\bigfile.txtÀ 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 k{@±æ¨rarfile-3.1/test/files/rar3-comment-plain.rar0000644000175000017500000000045413447402474017316 0ustar hlehleRar!Ïs Ò™z€# ¼Pìu3CMT ‹ìËöVÁH)å¿æÿðÐkjvzî t +lPb=3 ¤file1.txtÀ¿ˆgö©ÿÔA™z€# H?o3€CMT ‹ìËö6V,x&oÍÿìÔ‹—½st +lPb=3 ¤file2.txtÀ¿ˆgö©ÿÔ| z€# ¦Ú3€CMTËì‰äsAH°ÏÙ'âþëW*ôÄ={@rarfile-3.1/test/files/rar5-crc.rar.exp0000644000175000017500000000135213447402474016115 0ustar hlehleArchive: test/files/rar5-crc.rar comment='RAR5 archive - crc\n' R5_FILE: hdrlen=45 datlen=55 hdr_extra=11 block_flags=0x0003:EXTRA,DATA name=stest1.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=3 dict=0 solid=False os=1:UNIX mode=0100644 cmp=55 dec=2048 vol=0 crc=0xc5b7e6a2 (3317163682) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 R5_FILE: hdrlen=61 datlen=2048 hdr_extra=27 block_flags=0x0003:EXTRA,DATA name=stest2.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=0 dict=0 solid=False os=1:UNIX mode=0100644 cmp=2048 dec=2048 vol=0 crc=0xc5b7e6a2 (3317163682) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 ctime=2016-05-22T09:12:33+00:00 atime=2016-05-22T09:12:37+00:00 rarfile-3.1/test/files/rar5-vols.part2.rar.exp0000644000175000017500000000016413447402474017360 0ustar hlehleArchive: test/files/rar5-vols.part2.rar --- test/files/rar5-vols.part2.rar is middle part of multi-vol archive --- rarfile-3.1/test/files/rar3-comment-psw.rar0000644000175000017500000000051413447402474017021 0ustar hlehleRar!Ïs Ò™z€# ¼Pìu3CMT ‹ìËöVÁH)å¿æÿðÐkjvzmÖt$”3lPb=3 ¤file1.txt³/e½ÀáðÞ'1xlmMjm€§A™z€# H?o3€CMT ‹ìËö6V,x&oÍÿìÔ‹—½¼t$”3lPb=3 ¤file2.txt³/e½ÀáðÞ'1xlmMjm€§| z€# ¦Ú3€CMTËì‰äsAH°ÏÙ'âþëW*ôÄ={@rarfile-3.1/test/files/rar5-solid.rar.exp0000644000175000017500000000076013447402474016462 0ustar hlehleArchive: test/files/rar5-solid.rar R5_FILE: hdrlen=33 datlen=58 hdr_extra=0 block_flags=0x0002:DATA name=stest1.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=3 dict=3 solid=False os=1:UNIX mode=0100666 cmp=58 dec=2048 vol=0 crc=0xc5b7e6a2 (3317163682) R5_FILE: hdrlen=33 datlen=13 hdr_extra=0 block_flags=0x0002:DATA name=stest2.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=3 dict=3 solid=True os=1:UNIX mode=0100666 cmp=13 dec=2048 vol=0 crc=0xc5b7e6a2 (3317163682) rarfile-3.1/test/files/rar5-psw-blake.rar0000644000175000017500000000465013447402474016444 0ustar hlehleRar!óá‚ë €€€ñ ?¥¥[ –Õ€CMTRAR5 archive - nohdr-password-blake hÊ—x_À€¤ƒ€ stest1.txt0µ˜t  Qš@s½ý àFB ÜÓŠ·¾’™«>tÓ«Ç`9x”™Ýý¸ ü‰ž"\ÛÓôŸYJ5í¶<’;d«ÚÛ£¿h¶%žááÅK¢ðÖ^ €Ì —æ(̽g˜ ˜–ŽÔ.ømµ{aˆƒºbn›&}곸“áXC¡«ñ§¸­õߨßa ¶l]¿Ñ%œ%X¤oæÄu Üþ ˆo€€¤ƒ€ stest2.txt0µ˜t  Qš@s½ý àFä ÍîU© „¦4© AÖà9x”™Ýý¸ ü‰ž"\ÛÓôŸYJ5í¶<’;d«ÚÛ£¿h¶%žááÅK¢ðÖ^€Ì —æ(̀㠴рpE ´Ñ¯3¿´ÄZB«üp…ÀŽÉ?ÎÒ2ò Àøìû„Ùùx8¨Ë}»%;Ý!x’u Љ&æ·ïŒ„`K˜ .þ›˜zŸaÅÉd7W I¬š )Ú i´‘Ö:gýk®,(nM…ÛrD”¥W<Í–öÖÌ>ÿfæü»ÿoÜ¡§íOn\þ÷‡ªOëRÙ3PàÔùªŽ9ÌE±Õ“ä¼ðêµ¹ªðï—¯±ñÜ4ê…Øxøë‹#GçCä2,æaÍX7¹çòOa‹l{—çRü[yµÍµnÒ~ [J ;Ñ=Š]&kf¤Ss¦Î ä÷D\çÐðÈå},Ô &œ@ʯB»!¯¶çÔèó zƼd¡à©jP£øÄDtéìYQßÝ^ .2+Ú~ùžXNMBºCeŽÔ}5¯xå-׊Üf›1uÛ«ç\žùF¨C_æÔôf@ìë/‚‰IÍ“ .Øîõî» ÷Â%£hÒü¿ðåÈΛ¨.’Ä]\.çtÐ0㯫t‘‚ö8Œ˜ü‡FË¿lÖ™Æ0Q(Ä:\5ô'¹4ŒoÛ«!RôÎð ÿ¯º5¡_â7‡Gú@êÚK“\´¤ î÷ð¼¼)Akt_fŠKäNæ¹j‚[;…ܶvv%Lè‹•‚ÉýxPмˆë³:u¸ÏÙà%ý€7™’¡gir%¥ì‹å @Ŧéûnç>ǵÞOè}rì#x¡IW÷Ó0ጥÊê‹ÞKã릀 eæÍ¡ädÕKÒÚOJ›“âBvî|Æ[gxmm0Ç÷×AÈÉö+Å Ý*ë&Cú?ÂÞ™ÖñNæÇU믬ÜÄúý5: «Cøält¥!ˆÃ‡6ïÇ÷&J¸œ€™*Æ+|¼dZ’à†7OœÍô³„Rý 7þK@–¥xG‹ ktáŒm¹ ò«>L¬ºØZ|Œët…g°„™€Ž»ß&òž+âÜ{Th©=¶ÞÅpÆ’W££yjѨDE PÅ8É}fJ¥,¿a-=zlݶp0'±Ùø"Ùzúãq™©w¹009|© àÈ N‰à¾ ÎÇ$Ó0Š¢öTÉ,b(FÇ]ÝÙ!DµK3,Ìz$Õø—Z¦³·¶4†Ãz s¡¹‡¨^ȸ<+2è8; Ð¤GÖÚÉJ \mwŽàåÍ_‚çL‚³×ñyÎ6Z•þaÇ1ÑË[<"›,â"ÿÐÚ¢µn|†ÚUÚ4ƒD^spÆy¨RXîèQB¤¦;yÂIx±;DÍêÄRn'ž"ìÜ)1‹ܪeh]V·ea,^/¸–»Öâ $aÀ±žô8ØŽâÎzžtL4aÎGöëoÀttš“SB‘~üi¸®mÒ‚ÉuÀzf,6…ëÁ,IÚ¤N÷–œoË¢ó£§"̹)f kágÚäÈ©3º9^LôÆÁQbnºW«ÄÍ$ÁŠÚjM%$#¡”ƒíº+45gàê90¤NŒÜi¢›ÕÏñBÕ9C÷Èð3âBï4É_S¬SÝõñwiNÓTÎÛ«ÌäçP¶ÁýóWÉ ~ÐU„öµ–½êáów‘%Å*æ`Q—$¨†…¾[áfΔ.Óþ} Ü¹÷'Þ(Œ}£”äŽÉÁ1Ÿx·–Oór×I î À0évÜæ±î£¹?]n&!Q¤­ß1N$¢Ø|húÑ'A=ý¨'&ÆJ…™Ýø#3ÉÝX܇|Ö„Ò´¸Ìx£dÁÂjÑI@}ƒYYõׂ¦Â g:ü"ˆÿॖ¤Í,¾…û7ÌÜ%‹m•J€þXQr s^9Õ ¢Ò¬Äñ!(°¬g‚šÞÞREö¾Ö6A¡&ÕU!ŠjWKåw¦y‹p¨¸]¦&Õ¿Û|öÀ§üZ#!ß PÇiÍæx 6'Ý„‚J’"} \œ±±h,µ=ýµùó–˜Ã9T¬¾0,ÁYݺ£Œ>³Tœ #ïóDvÌŠÔO!±3· ìÁWº!K0—ö¡‘Ími^mHa &nðZ£µàjz!»+3ôzR™6Ëî["™0 afile.txtü«:‰—«ª>Ä={@rarfile-3.1/test/files/rar202-comment-psw.rar0000644000175000017500000000037613447402474017170 0ustar hlehleRar!½s3øu& 4îPL m ¨+Ÿ•þ«£­©€t €B º}znc=3 FILE1.TXT!Qu 0ÞYfile1commentSæ}~sÎ+»í…*ö¿«L-„ç5Œ×g5/ŒÆ¼ç%ât €B ãÃ_xqc=3 FILE2.TXT­du 0=^file2commentÓ¾CïÔ¿yZ•|-®ÃIû—Ö·ùçwª^À¨rarfile-3.1/test/files/ctime4.rar0000644000175000017500000000012013447402474015061 0ustar hlehleRar!Ïs °òt 5—«ª>0 afile.txtÿ«:‰—«ª>«:‰Ä={@rarfile-3.1/test/files/rar3-comment-hpsw.rar0000644000175000017500000000074413447402474017176 0ustar hlehleRar!Ιs€ ˜Õ:¹›À„zÖ¾T$pzs!))@—¢5ršÅð=Ç@.a ¹ö1[…‚¤ïü³>$å’â&ÕöÂdAî.ûŠƒB."ªP]L\råû™?w ZéJ:Øï ˜Õ:¹›À„zà“¦àY$HD&VÍmÈ—YùÊO•ýì…Aàÿ Ðñõˆjƒ 4ßþq[idsŒ¿èõâYn¾ºwRÕ5{ý20ñt^(­˜Õ:¹›À„ztŒ¼ÔÕ5Ô?äNa&Óô4ßΈ6Ñ [¹÷U6â¤ÑZɨx$ÓW³ÛÊ×tBb¿);Þš´{¿‚xañ¡.YŽ ªÉ‚ÌÒY!Ñ 'SɘÕ:¹›À„z!IËò¤Ê¡îZZ£¹Y¸¨wQw„b‘AM“ãÝÄL÷™1¾×šã­aÚ YNÇ9(“Á8$å‚ÝQ¨=ãÍwRÕ5{ý20ñt^(­˜Õ:¹›À„zþ+ç>ìÒZ!õ4â-ÃÔ&X)É0mÌY=äËîé¡"´s4ùƒ&O ÓMfg¿±åŲìt}D.ªò)pïÐÎ7ü¡²äÔF˘Õ:¹›À„z.žÎ…gØô…æÝjÜdö¶|rarfile-3.1/test/files/rar5-quick-open.rar0000644000175000017500000000050613447402474016626 0ustar hlehleRar!ûഠȀ;âî ·€¤ƒŒôM¢æ·Å€ stest1.txtĪ4D4$ú2ëGúÄM}½æ€‚ ŒÁ*•Ê"›P“Ý@ü@Ô`6íù·Tƒ*dNÍ|àßAB© ·€¤ƒŒôM¢æ·Å€ stest2.txtĪ4D4$ú2ëGúÄM}½æ€‚ ŒÁ*•Ê"›P“Ý@ü@Ô`6íù·Tƒ*dNÍ|àU8½ÛÛ€QOœâP†)¸%;âî ·€¤ƒŒôM¢æ·Å€ stest1.txt×ÁX(\%ßAB© ·€¤ƒŒôM¢æ·Å€ stest2.txtwVQrarfile-3.1/test/files/rar5-hlink.rar.exp0000644000175000017500000000203213447402474016447 0ustar hlehleArchive: test/files/rar5-hlink.rar R5_FILE: hdrlen=37 datlen=55 hdr_extra=0 block_flags=0x0002:DATA name=stest1.txt file_flags=0x0006:MTIME,CRC32 cmp_algo=0 cmp_meth=3 dict=0 solid=False os=1:UNIX mode=0100664 cmp=55 dec=2048 vol=0 crc=0xc5b7e6a2 (3317163682) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 R5_FILE: hdrlen=53 datlen=0 hdr_extra=15 block_flags=0x0003:EXTRA,DATA name=stest2.txt file_flags=0x0006:MTIME,CRC32 cmp_algo=0 cmp_meth=0 dict=0 solid=False os=1:UNIX mode=0100664 cmp=0 dec=2048 vol=0 crc=0x00000000 (0) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 redir: type=HARD_LINK flags=0:- destination=stest1.txt R5_FILE: hdrlen=53 datlen=0 hdr_extra=15 block_flags=0x0003:EXTRA,DATA name=stest3.txt file_flags=0x0006:MTIME,CRC32 cmp_algo=0 cmp_meth=0 dict=0 solid=False os=1:UNIX mode=0100664 cmp=0 dec=2048 vol=0 crc=0x00000000 (0) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 redir: type=HARD_LINK flags=0:- destination=stest1.txt rarfile-3.1/test/files/ctime3.rar0000644000175000017500000000011713447402474015066 0ustar hlehleRar!Ïs vt 4—«ª>0 afile.txtþ«:‰—«ª>:‰Ä={@rarfile-3.1/test/files/ctime3.rar.exp0000644000175000017500000000043013447402474015657 0ustar hlehleArchive: test/files/ctime3.rar FILE: hdrlen=52 datlen=0 flags=0x9020:EXTTIME,LONG,D128 os=2:WIN ver=29 mode=0x20 meth=0 cmp=0 dec=0 vol=0 crc=0x00000000 (0) date_time=2011-05-10 21:28:47 name=afile.txt mtime=2011-05-10T21:28:47.899345 ctime=2011-05-10T21:28:47.899328 rarfile-3.1/test/files/rar5-solid-qo.rar0000644000175000017500000000077413447402474016311 0ustar hlehleRar!Ãà. “‚€Ò y(»€¤ƒt€AW¢æ·Å€somedir/stest1.txt 8SSBú#æöÿ˜ö46ÓÀÀÀG¼#íª«¨¨™À&'&À £¡_Ûc׳“4µ'ùÖÑ€VƼ¬ Œ€¤ƒŒôM¢æ·ÅÀ stest1.txtF `}~}~»i‡(Œ€¤ƒt€AW¢æ·ÅÀsomedir/stest2.txtF `}~}~†¼ë Œ€¤ƒŒôM¢æ·ÅÀ stest2.txtF `}~}~?®ÆÆ€QOqÇé1ƒ-Ò y(»€¤ƒt€AW¢æ·Å€somedir/stest1.txt¶cѲ)›%VƼ¬ Œ€¤ƒŒôM¢æ·ÅÀ stest1.txtÚH{“0j-»i‡(Œ€¤ƒt€AW¢æ·ÅÀsomedir/stest2.txtºqók(1%†¼ë Œ€¤ƒŒôM¢æ·ÅÀ stest2.txtwVQrarfile-3.1/test/files/rar3-vols.part2.rar0000644000175000017500000031000013447402474016554 0ustar hlehleRar!zs  t#2¦È ­Pø¿R]¸H0´vols\bigfile.txtÀ 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 [È{@C§;Drarfile-3.1/test/files/rar5-solid-qo.rar.exp0000644000175000017500000000235713447402474017103 0ustar hlehleArchive: test/files/rar5-solid-qo.rar R5_FILE: hdrlen=45 datlen=59 hdr_extra=0 block_flags=0x0002:DATA name=somedir/stest1.txt file_flags=0x0006:MTIME,CRC32 cmp_algo=0 cmp_meth=3 dict=3 solid=False os=1:UNIX mode=0100644 cmp=59 dec=2048 vol=0 crc=0xc5b7e6a2 (3317163682) date_time=2016-05-22 09:48:36 mtime=2016-05-22T09:48:36+00:00 R5_FILE: hdrlen=37 datlen=12 hdr_extra=0 block_flags=0x0002:DATA name=stest1.txt file_flags=0x0006:MTIME,CRC32 cmp_algo=0 cmp_meth=3 dict=3 solid=True os=1:UNIX mode=0100644 cmp=12 dec=2048 vol=0 crc=0xc5b7e6a2 (3317163682) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 R5_FILE: hdrlen=45 datlen=12 hdr_extra=0 block_flags=0x0002:DATA name=somedir/stest2.txt file_flags=0x0006:MTIME,CRC32 cmp_algo=0 cmp_meth=3 dict=3 solid=True os=1:UNIX mode=0100644 cmp=12 dec=2048 vol=0 crc=0xc5b7e6a2 (3317163682) date_time=2016-05-22 09:48:36 mtime=2016-05-22T09:48:36+00:00 R5_FILE: hdrlen=37 datlen=12 hdr_extra=0 block_flags=0x0002:DATA name=stest2.txt file_flags=0x0006:MTIME,CRC32 cmp_algo=0 cmp_meth=3 dict=3 solid=True os=1:UNIX mode=0100644 cmp=12 dec=2048 vol=0 crc=0xc5b7e6a2 (3317163682) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 rarfile-3.1/test/files/rar3-old.rar0000644000175000017500000031000013447402474015320 0ustar hlehleRar!²ïs cŒt"2¦È Óg †R]¸H0´vols\bigfile.txtÀ 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 H‹{@5œ£rarfile-3.1/test/files/rar5-vols.part1.rar0000644000175000017500000031000013447402474016555 0ustar hlehleRar!>¯’ ü†€Æ‚†€—âú(¹ÈÁ ´ƒýDW7H@[€vols/bigfile.txt 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 lk*··€QO7âK2æ-—âú(¹ÈÁ ´ƒýDW7H@[€vols/bigfile.txt’Ã6„„€RR{RB}ºæ÷§†lOrBHŽNúBaïîK"2@ŸW˜qvèY°‰ŽLˆTrØ£$Øù\ÁÂøA$Ð[ÿìÚÒy¯Ç<0zwl I4S¿´`>”ö çcÑ ýÔ™’úÙ;Jcu·5:Ï=q€™ºvü‘¸Cý7AÓq”/^Ýæ2ÀÄ"±*‡Fý`?¢Zc¾’HQPçoQ ¾/b.Ö æð¯œ.%³¾à-‰kªËn åLÄP hªUwžˆÑl—õ;$ Qd÷ÿ‡ìéì½S1 O–å‡OIrJù™µ}êt¶ÿI#“p‰ÔW×@§”ähš÷lì<²Ð ïòç2]ÁÒ-¼'ŽR¼=SîÈN×N³*Çj!a¬ %]Gef<2ZøÐËáqZF´›¥wC[(jýn=iþTûûÚtr—‚¶Åwp'2éÞüJà÷7dÑa–H–‚9Ò†Þ‡‚†?œ ãáœÑ[ÞÆPÉë9'Ò<Ä}$zß @íòCH•i0¢ô4“s$hüÓ¬æuXD' BµµJAÀˆê Å´½unäE£f‰øVíÉž¯Uð®8Mvsïâš4„gx¥…;ð" AkÔušqŽ«Ë†~G w'vØkÀ =0Ž‚ä Û05™( ÄŽ‚R«Žcãdュ¤Tx™è®þ|vzpgˆÔle»rÇ‚}*¶Åtc9R¿;»9ýˆ¡k,±BAÐi\c9ªÓKr °ÖÞ8©Ì}>ç[ãÎ)¦Ák’ÇË¢xŽ'æŸáÝU‡,Óšn9 ?0’[ý$ÀwÍö 6`ózãÈç¢.¥)×:Oü¼‘5Z]çÐGRWŒ¾¾Äð´2/`]\uGøJ£nç§Œýý.(Uf÷eì}ƒ0‘÷.n™íëj©½¾E§FäA>¶ôÌšæóÆpKÅ|….ƒüÓÝ´nA1ø4:ââŠv…,€Ð–†$òìTì6ñ2W÷ÉÌN ÌVÖÀ&@l±ê7Lx­$Ê=”h¤¾©8K÷«Ò0 1â+‡Î4ùۼ縸AnÉê¯u–¡sá?‚g*T³‰kSA ~Ïni7"g„Lñ˜¡ ø°xqép )³i‰ñPÕŽW 2íŒÎå­›Ž{>RœáSì<Žê7\ˆðëkQÖË:Ê£Ÿ¡ÔÕªñ;¯ñŒuýájk*IšŠ)#y1Œ˜÷—ò™Ó2Iæpô7¾„ÏÛ&^²§)é$Ô¨P,ãørÕHŒ'>¾)­è) /õíŒýÛ[q[:ÄÈlÃ2·¸íoJþÛf|3Ĭlà‰¡y{/ ø„ ˆ7oœåîꃚ9ŸOqræ%7ý ßû¯øë}—Ps ?’zS¦ðÌDKìÉ™W€ß„ß@‰AúcÚ á[â ³»ç' _Þ¡ÄòáÙþV®¾íÅäBôSüÕxQµ/Ñsû#Èf›<«b¬ÕÜÁQên[|ô¬üÆ,mƒc»Ha“ ¡`ÑêX×L·å,—Ük ~Ü–ÓÿW†YõNˆ8¯=‘–«Óyè"¬Hvg}gêæ”Þ¶°‹šÕA¡Ô¨.Ö¡¼ô#?¬œÊ(ý6²ÓÀ6nêäqéðÏWOváèAÀ-‘ékßÌ\’™Z(Üø,Q™ Ç:V‹*ú’­.31«#/á {׿˜6yÞã†.›B©êû;úX¹(u¤xí0•]¾¾yîrÖi³µ2Î)¼s.`J0w»Î_|–ê‰ì#ŠŠjÛôÕMÞög‹Êô¤Ö™/—Ñ5Ç/Á ɼ­Å\ïîí´n/ý²¦¡ T©µ²è— Ÿu> ßÚÓÞ&÷Hîé<=±õ º„BJ€Þøé>|úÅp‰°@¤‡­€‚ÏyöˆO`Ú&"‘ׇDŒm?m‘ä›=bž^È/U2téá®­ÞÀk F³#Î-ÇY{4{‡¤ë ƒ“ƒŠ_ψ³f±‰}ж1^JÄCÅi¢ÊeÔY G‰ù€¶‚…=»(ÉçBnIƹk˜ÜÝ×:]=I¼úù2?Ûÿ+JÞn¸VPTm›ßsWëÉðœóÂqj-8kW"¤ÎÄ5ÄŽ`èXù¤cOY·3à†¼yBtЄèãMåÅ×Kð\ Ï­°à{RB}¦Ljˆ1YhBHŽNúBaïîK"2@ŸW˜qvèY°‰ŽLˆTrØ£$Øù\ÁÂøA$Ð[ÿìÚÒy¯Ç<0zwl I4S¿´`>”ö çcÑ ýÔ™’úÙ;Jcu·5:Ï=q€™ºvü‘¸Cý7AÓq”/^Ýæ2ÀÄ"±*‡Fý`?¢Zc¾’HQPçoQ ¾/b.Ö æð¯œ.%³¾à-‰kªËn åLÄP hªUwžˆÑl—õ;$ Qd÷ÿ‡ìéì½S1 O–å‡OIrJù™µ}êt¶ÿI#“p‰ÔW×@§”ähš÷lì<²Ð ïòç2]ÁÒ-¼'ŽR¼=SîÈN×N³*Çj!a¬ %]Gef<2ZøÐËáqZF´›¥wC[(jýn=iþTûûÚtr—‚¶Åwp'2éÞüJà÷7dÑa–H–‚9Ò†Þ‡‚†?œ ãáœÑ[ÞÆPÉë9'Ò<Ä}$zß @íòCH•i0¢ô4“s$hüÓ¬æuXD' BµµJAÀˆê Å´½unäE£f‰øVíÉž¯Uð®8Mvsïâš4„gx¥…;ð" AkÔušqŽ«Ë†~G w'vØkÀ =0Ž‚ä Û05™( ÄŽ‚R«Žcãdュ¤Tx™è®þ|vzpgˆÔle»rÇ‚}*¶Åtc9R¿;»9ýˆ¡k,±BAÐi\c9ªÓKr °ÖÞ8©Ì}>ç[ãÎ)¦Ák’ÇË¢xŽ'æŸáÝU‡,Óšn9 ?0’[ý$ÀKߘü` bM³Œ,ñ±:g_'9q¨d¦í)xF«¯Ïh_c(}!pŸlStÎj²|†"Ô ¡[ÀÈ)Ë;C']Já é TÊÆuo‚µùÆ[{àäÊ}„ßtsIš¦d :ÝÐ¥ŽeâßO›u‹GH¿ÌFXµ_ãÌólX–¥§jV].°Ìë§ßˆÖl™¨³¿üb%N•ÂESÎ tü©@!àš¹œBÚlÑüÑöÆá©/hš?€džáY@[;ñØT\{⬡KòoIÍ——BI1îÿ2¹æ Þ`匨ÓxzÆd±4‰ûbÍÙQ‡8ÎÓéÙÀjB€Ìá’q£z!1H+$$CZtXo ¹fQâKŒ·$'cpž¬À  è_M¹.õ b“²=‰ÍãÞŽL98‚Âcö§Ä¬ëË2ÕrP‹ùN‡~ÕÙ”Z}¾íÒö#Á*GÂØ•ÇÑ Y3½nêo¦xd;Ø2Ø|xX‘úˆd;ŸuŸþUc=΀œê,ÅÿŠXàÔ—/FÐÀÅ,éhÕ:@HzÅ„·]xaGC¹¬Z;6,Ù O'Â%­$RM±^N”{¿F¼ÆÙôU)ŸóßÔZ*|´ã ᑞ>¤”Æz|óäÌûìÉ…ûŸ×?Èi‰èL( MMÞM(]+ð“_hq¹ƒôÜ¿?«Ìæ½2á6~nT~˪&èÆšÒš –°#^º<¹2,—ùó­ã ‹Á³th™ž!­5pÌ@Îaæ!ZÓ7å1œŒÁŸþe 6Ii÷¸1›KlH% ²JW>iÌȽº7Ž1ì.Qè‰âæêß0#y= ÀYèÅ­ã|â­Ñ¹=§´¾kg†XÃäÑ‚C²ð¿í"ÌCp«,¢AÚ&ë2VÄH6 À§;¶I ¸ôs?à»—7µÍü‹æ<ÄÙB\7(û¡ÈÚ Ôåõãvlô“·¼*¼êªHeè…«gäï Û÷f…ähŽÏƒüïCÕ°÷¼“?¾×ä¿…c"jéBü8âìâ5þµûÚ2ü<Ÿ„#öï?˜ܪœ—ÛÀðZt´€ÿŠ#a`晡[B¬ýqˆÃ™]I>*DJ„¢ñÂd°HŒB"I+‚¬DâøÄ|¦íë+Q]¢D“Åóš§õ£qúrZ?Ú 4OŠš‡B7t0)ô=82„Ш!8M<Eweüa‚‡*DÇàvníwœh”Únv†Í/cŽ n µ#zŒ«© 0 [¨¥3ˆ=·V°Wë6ÂèÚAÊœ>qiœ87aäëµÜ ,@}/´‹áÄ‹GQ&rarfile-3.1/test/files/rar3-vols.part3.rar.exp0000644000175000017500000000016413447402474017357 0ustar hlehleArchive: test/files/rar3-vols.part3.rar --- test/files/rar3-vols.part3.rar is middle part of multi-vol archive --- rarfile-3.1/test/files/seektest.rar.exp0000644000175000017500000000075113447402474016330 0ustar hlehleArchive: test/files/seektest.rar FILE: hdrlen=44 datlen=90 flags=0x9020:EXTTIME,LONG,D128 os=3:UNIX ver=29 mode=0100644 meth=5 cmp=90 dec=2048 vol=0 crc=0xc5b7e6a2 (3317163682) date_time=2011-06-12 12:53:33 name=stest1.txt mtime=2011-06-12T12:53:33 FILE: hdrlen=44 datlen=2048 flags=0x9020:EXTTIME,LONG,D128 os=3:UNIX ver=20 mode=0100644 meth=0 cmp=2048 dec=2048 vol=0 crc=0xc5b7e6a2 (3317163682) date_time=2011-06-12 12:53:33 name=stest2.txt mtime=2011-06-12T12:53:33 rarfile-3.1/test/files/rar15-comment.rar.exp0000644000175000017500000000076713447402474017102 0ustar hlehleArchive: test/files/rar15-comment.rar comment='RARcomment -----' FILE: hdrlen=72 datlen=7 flags=0x8008:COMMENT,LONG,D64 os=0:DOS ver=15 mode=0x20 meth=3 cmp=7 dec=7 vol=0 crc=0xe27f07a9 (3799975849) date_time=2010-11-03 19:49:32 name=FILE1.TXT comment='file1comment -----' FILE: hdrlen=72 datlen=8 flags=0x8008:COMMENT,LONG,D64 os=0:DOS ver=15 mode=0x20 meth=0 cmp=8 dec=8 vol=0 crc=0x3c4306f7 (1011025655) date_time=2010-11-03 19:49:38 name=FILE2.TXT comment='file2comment -----' rarfile-3.1/test/files/rar202-comment-psw.rar.exp0000644000175000017500000000100013447402474017744 0ustar hlehleArchive: test/files/rar202-comment-psw.rar comment='RARcomment' FILE: hdrlen=66 datlen=32 flags=0x800c:PASSWORD,COMMENT,LONG,D64 os=0:DOS ver=20 mode=0x20 meth=3 cmp=32 dec=7 vol=0 crc=0x7a197dba (2048490938) date_time=2010-11-03 00:27:28 name=FILE1.TXT comment='file1comment' FILE: hdrlen=66 datlen=32 flags=0x800c:PASSWORD,COMMENT,LONG,D64 os=0:DOS ver=20 mode=0x20 meth=3 cmp=32 dec=7 vol=0 crc=0x785fc3e3 (2019541987) date_time=2010-11-03 00:27:34 name=FILE2.TXT comment='file2comment' rarfile-3.1/test/files/rar202-comment-nopsw.rar0000644000175000017500000000031413447402474017515 0ustar hlehleRar!½s3øu& 4îPL m ¨+Ÿ•þ«£­©€mÏt€Bº}znc=0 FILE1.TXT!Qu 0ÞYfile1commentfile1 X/t€BãÃ_xqc=0 FILE2.TXT­du 0=^file2commentfile2 rarfile-3.1/test/files/rar5-solid.rar0000644000175000017500000000025113447402474015662 0ustar hlehleRar! ïÈo €€€Þõprº€¶ƒ¢æ·Å€ stest1.txtÁ¬7DD#ú#ö—ýbSQ¾L‘AŒÁy\¿G£ª- 6“Ý X@ÔPvöÄ2êŸ2¥ÄÌ׃ßè-‰€¶ƒ¢æ·ÅÀ stest2.txtE `ß·ûöüwVQrarfile-3.1/test/files/rar202-comment-nopsw.rar.exp0000644000175000017500000000075413447402474020320 0ustar hlehleArchive: test/files/rar202-comment-nopsw.rar comment='RARcomment' FILE: hdrlen=66 datlen=7 flags=0x8008:COMMENT,LONG,D64 os=0:DOS ver=20 mode=0x20 meth=0 cmp=7 dec=7 vol=0 crc=0x7a197dba (2048490938) date_time=2010-11-03 00:27:28 name=FILE1.TXT comment='file1comment' FILE: hdrlen=66 datlen=7 flags=0x8008:COMMENT,LONG,D64 os=0:DOS ver=20 mode=0x20 meth=0 cmp=7 dec=7 vol=0 crc=0x785fc3e3 (2019541987) date_time=2010-11-03 00:27:34 name=FILE2.TXT comment='file2comment' rarfile-3.1/test/files/rar5-quick-open.rar.exp0000644000175000017500000000120613447402474017417 0ustar hlehleArchive: test/files/rar5-quick-open.rar R5_FILE: hdrlen=37 datlen=55 hdr_extra=0 block_flags=0x0002:DATA name=stest1.txt file_flags=0x0006:MTIME,CRC32 cmp_algo=0 cmp_meth=3 dict=0 solid=False os=1:UNIX mode=0100644 cmp=55 dec=2048 vol=0 crc=0xc5b7e6a2 (3317163682) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 R5_FILE: hdrlen=37 datlen=55 hdr_extra=0 block_flags=0x0002:DATA name=stest2.txt file_flags=0x0006:MTIME,CRC32 cmp_algo=0 cmp_meth=3 dict=0 solid=False os=1:UNIX mode=0100644 cmp=55 dec=2048 vol=0 crc=0xc5b7e6a2 (3317163682) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 rarfile-3.1/test/files/rar5-crc.rar0000644000175000017500000000435513447402474015330 0ustar hlehleRar!óá‚ë €€€&8õÄ””†ê¥•€CMTRAR5 archive - crc „öô( ·€¤ƒ¢æ·Å€ stest1.txt €Ì —æ(ÌĪ4D4$ú2ëGúÄM}½æ€‚ ŒÁ*•Ê"›P“Ý@ü@Ô`6íù·Tƒ*dNÍ|à‚ÞÍ68€€¤ƒ¢æ·Å€ stest2.txt€Ì —æ(̀㠴рpE ´Ñ000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 069 070 071 072 073 074 075 076 077 078 079 080 081 082 083 084 085 086 087 088 089 090 091 092 093 094 095 096 097 098 099 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 wVQrarfile-3.1/test/files/seektest.rar0000644000175000017500000000431513447402474015535 0ustar hlehleRar!Ïs Ëût ,Z¢æ·Å°fÌ>5 ¤stest1.txtÀ ÌÌþŒÞ¯ÿì_5u’eâf–åVH,WF@0 ¤stest2.txtÀ000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 069 070 071 072 073 074 075 076 077 078 079 080 081 082 083 084 085 086 087 088 089 090 091 092 093 094 095 096 097 098 099 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 Ä={@rarfile-3.1/test/files/rar5-times.rar0000644000175000017500000000020413447402474015667 0ustar hlehleRar!óá‚ë €€€YçC( ·€¤ƒ¢æ·Å€ stest1.txt  ŒôMxAWĪ4D4$ú2ëGúÄM}½æ€‚ ŒÁ*•Ê"›P“Ý@ü@Ô`6íù·Tƒ*dNÍ|àwVQrarfile-3.1/test/files/rar5-vols.part1.rar.exp0000644000175000017500000000125613447402474017362 0ustar hlehleArchive: test/files/rar5-vols.part1.rar R5_FILE: hdrlen=45 datlen=205000 hdr_extra=0 block_flags=0x0012:DATA,SPLIT_AFTER name=vols/bigfile.txt file_flags=0x0006:MTIME,CRC32 cmp_algo=0 cmp_meth=0 dict=0 solid=False os=1:UNIX mode=0100664 cmp=205000 dec=205000 vol=0 crc=0x509ad74c (1352324940) date_time=2016-05-24 08:42:37 mtime=2016-05-24T08:42:37+00:00 R5_FILE: hdrlen=45 datlen=2050 hdr_extra=0 block_flags=0x0002:DATA name=vols/smallfile.txt file_flags=0x0006:MTIME,CRC32 cmp_algo=0 cmp_meth=0 dict=0 solid=False os=1:UNIX mode=0100664 cmp=2050 dec=2050 vol=2 crc=0xd08a1f86 (3498712966) date_time=2016-05-24 08:42:43 mtime=2016-05-24T08:42:43+00:00 rarfile-3.1/test/files/ctime2.rar.exp0000644000175000017500000000043013447402474015656 0ustar hlehleArchive: test/files/ctime2.rar FILE: hdrlen=51 datlen=0 flags=0x9020:EXTTIME,LONG,D128 os=2:WIN ver=29 mode=0x20 meth=0 cmp=0 dec=0 vol=0 crc=0x00000000 (0) date_time=2011-05-10 21:28:47 name=afile.txt mtime=2011-05-10T21:28:47.899345 ctime=2011-05-10T21:28:47.897843 rarfile-3.1/test/files/rar3-vols.part3.rar0000644000175000017500000000501413447402474016563 0ustar hlehleRar!zs ´5t!2|È LךPR]¸H0´vols\bigfile.txtÀ 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 Xt 4†ŠÐU]¸H0´vols\smallfile.txtÀ 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 t{@ŸtDÜrarfile-3.1/test/files/rar5-times2.rar.exp0000644000175000017500000000051413447402474016550 0ustar hlehleArchive: test/files/rar5-times2.rar R5_FILE: hdrlen=42 datlen=0 hdr_extra=11 block_flags=0x0003:EXTRA,DATA name=afile.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=0 dict=0 solid=False os=0:WINDOWS mode=0x20 cmp=0 dec=0 vol=0 crc=0x00000000 (0) date_time=2011-05-10 18:28:47 mtime=2011-05-10T18:28:47.899345+00:00 rarfile-3.1/test/files/rar15-comment-lock.rar.exp0000644000175000017500000000077413447402474020026 0ustar hlehleArchive: test/files/rar15-comment-lock.rar comment='RARcomment -----' FILE: hdrlen=72 datlen=7 flags=0x8008:COMMENT,LONG,D64 os=0:DOS ver=15 mode=0x20 meth=3 cmp=7 dec=7 vol=0 crc=0xe27f07a9 (3799975849) date_time=2010-11-03 19:49:32 name=FILE1.TXT comment='file1comment -----' FILE: hdrlen=72 datlen=8 flags=0x8008:COMMENT,LONG,D64 os=0:DOS ver=15 mode=0x20 meth=0 cmp=8 dec=8 vol=0 crc=0x3c4306f7 (1011025655) date_time=2010-11-03 19:49:38 name=FILE2.TXT comment='file2comment -----' rarfile-3.1/test/files/rar5-psw.rar.exp0000644000175000017500000000214213447402474016155 0ustar hlehleArchive: test/files/rar5-psw.rar comment='RAR5 archive - nohdr-password\n' R5_FILE: hdrlen=94 datlen=64 hdr_extra=60 block_flags=0x0003:EXTRA,DATA name=stest1.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=3 dict=0 solid=False os=1:UNIX mode=0100644 cmp=64 dec=2048 vol=0 crc=0xba28eeea (3123244778) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 algo=0:AES256 enc_flags=0003:CHECKVAL,TWEAKED kdf_lg=15 kdf_count=32768 salt=7e982cdd1ae21c36c7a391da8d088a68 iv=a03aad26f4827b87d54c725ce73b6967 checkval=8151cff63649c16e186a220f R5_FILE: hdrlen=110 datlen=2048 hdr_extra=76 block_flags=0x0003:EXTRA,DATA name=stest2.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=0 dict=0 solid=False os=1:UNIX mode=0100644 cmp=2048 dec=2048 vol=0 crc=0xba28eeea (3123244778) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 ctime=2016-05-22T09:12:33+00:00 atime=2016-05-22T09:12:37+00:00 algo=0:AES256 enc_flags=0003:CHECKVAL,TWEAKED kdf_lg=15 kdf_count=32768 salt=7e982cdd1ae21c36c7a391da8d088a68 iv=df83fa0cd86e88b8b6f851467d7949d2 checkval=8151cff63649c16e186a220f rarfile-3.1/test/files/ctime4.rar.exp0000644000175000017500000000043013447402474015660 0ustar hlehleArchive: test/files/ctime4.rar FILE: hdrlen=53 datlen=0 flags=0x9020:EXTTIME,LONG,D128 os=2:WIN ver=29 mode=0x20 meth=0 cmp=0 dec=0 vol=0 crc=0x00000000 (0) date_time=2011-05-10 21:28:47 name=afile.txt mtime=2011-05-10T21:28:47.899345 ctime=2011-05-10T21:28:47.899345 rarfile-3.1/test/files/rar5-times.rar.exp0000644000175000017500000000056513447402474016474 0ustar hlehleArchive: test/files/rar5-times.rar R5_FILE: hdrlen=45 datlen=55 hdr_extra=11 block_flags=0x0003:EXTRA,DATA name=stest1.txt file_flags=0x0004:CRC32 cmp_algo=0 cmp_meth=3 dict=0 solid=False os=1:UNIX mode=0100644 cmp=55 dec=2048 vol=0 crc=0xc5b7e6a2 (3317163682) date_time=2011-06-12 09:53:33 mtime=2011-06-12T09:53:33+00:00 atime=2016-05-22T09:12:36+00:00 rarfile-3.1/test/files/rar15-comment-lock.rar0000644000175000017500000000032213447402474017220 0ustar hlehleRar!@‚s,°bu4òÐ’å£õþ´J]íá4@–t€H©â0žc=3 FILE1.TXT´Üu0«±file1comment -----Ózð€œßt€H÷C<3žc=0 FILE2.TXT'u0p”file2comment -----baaaar rarfile-3.1/test/test_format.py0000644000175000017500000001636513537437371015013 0ustar hlehle"""Format details. """ from datetime import datetime import pytest import rarfile def render_date(dt): if isinstance(dt, datetime): return dt.isoformat('T') elif isinstance(dt, tuple): return '%04d-%02d-%02d %02d:%02d:%02d' % dt else: return dt def mkitem(**kwargs): res = {} for k in kwargs: if kwargs[k] is not None: res[k] = kwargs[k] return res def dumparc(rf): res = [] for item in rf.infolist(): info = mkitem(fn=item.filename, file_size=item.file_size, compress_size=item.compress_size, CRC=item.CRC, date_time=render_date(item.date_time), arctime=render_date(item.arctime), mtime=render_date(item.mtime), atime=render_date(item.atime), ctime=render_date(item.ctime), comment=item.comment, extract_version=item.extract_version, compress_type=item.compress_type, mode=item.mode, host_os=item.host_os) res.append(info) return res def diffs(a, b): if len(a) != len(b): return 'Different lengths' problems = [] for i, xa in enumerate(a): xb = b[i] for k in xa: if k not in xb: problems.append('NewKey(%d,%s)=%r' % (i, k, xa[k])) for k in xb: if k not in xa: problems.append('MissingKey(%d,%s)=%r' % (i, k, xb[k])) for k in xa: if k in xb and xa[k] != xb[k]: problems.append('ErrValue(%d,%s):got=%r/exp=%r' % (i, k, xa[k], xb[k])) return '; '.join(problems) def cmp_struct(a, b): assert a == b, diffs(a, b) # # test start # @pytest.mark.skipif(not rarfile._have_crypto, reason="No crypto") def test_rar3_header_encryption(): r = rarfile.RarFile('test/files/rar3-comment-hpsw.rar', 'r') assert r.needs_password() is True assert r.comment is None assert r.namelist() == [] r.setpassword('password') assert r.needs_password() is True assert r.namelist() == [u'file1.txt', u'file2.txt'] assert r.comment is not None assert r.comment == 'RARcomment\n' @pytest.mark.skipif(not rarfile._have_crypto, reason="No crypto") def test_rar5_header_encryption(): r = rarfile.RarFile('test/files/rar5-hpsw.rar') assert r.needs_password() is True assert r.comment is None assert r.namelist() == [] r.setpassword('password') assert r.needs_password() is True assert r.namelist() == [u'stest1.txt', u'stest2.txt'] assert r.comment is not None assert r.comment == 'RAR5 archive - hdr-password\n' r.close() def get_vol_info(extver=20, tz='', hr='11'): return [ mkitem(CRC=1352324940, date_time='2016-05-24 %s:42:37%s' % (hr, ''), mtime='2016-05-24T%s:42:37%s' % (hr, tz), compress_type=48, compress_size=205000, extract_version=extver, file_size=205000, mode=33204, host_os=3, fn=u'vols/bigfile.txt'), mkitem(CRC=3498712966, date_time='2016-05-24 %s:42:43%s' % (hr, ''), mtime='2016-05-24T%s:42:43%s' % (hr, tz), extract_version=extver, compress_type=48, compress_size=2050, file_size=2050, mode=33204, host_os=3, fn=u'vols/smallfile.txt')] def test_rar3_vols(): r = rarfile.RarFile('test/files/rar3-vols.part1.rar') assert r.needs_password() is False assert r.comment is None assert r.strerror() is None cmp_struct(dumparc(r), get_vol_info()) assert r.volumelist() == [ 'test/files/rar3-vols.part1.rar', 'test/files/rar3-vols.part2.rar', 'test/files/rar3-vols.part3.rar'] with pytest.raises(rarfile.NeedFirstVolume): rarfile.RarFile('test/files/rar3-vols.part2.rar') def test_rar3_oldvols(): r = rarfile.RarFile('test/files/rar3-old.rar') assert r.needs_password() is False assert r.comment is None assert r.strerror() is None cmp_struct(dumparc(r), get_vol_info()) assert r.volumelist() == [ 'test/files/rar3-old.rar', 'test/files/rar3-old.r00', 'test/files/rar3-old.r01'] with pytest.raises(rarfile.NeedFirstVolume): rarfile.RarFile('test/files/rar3-old.r00') def test_rar5_vols(): r = rarfile.RarFile('test/files/rar5-vols.part1.rar') assert r.needs_password() is False assert r.comment is None assert r.strerror() is None cmp_struct(dumparc(r), get_vol_info(50, '+00:00', '08')) assert r.volumelist() == [ 'test/files/rar5-vols.part1.rar', 'test/files/rar5-vols.part2.rar', 'test/files/rar5-vols.part3.rar'] with pytest.raises(rarfile.NeedFirstVolume): rarfile.RarFile('test/files/rar5-vols.part2.rar') def expect_ctime(mtime, ctime): return [mkitem( mtime=mtime, date_time=mtime.split('.')[0].replace('T', ' '), ctime=ctime, compress_size=0, file_size=0, CRC=0, fn=u'afile.txt', extract_version=29, compress_type=48, mode=32, host_os=2)] def test_rar3_ctime0(): r = rarfile.RarFile('test/files/ctime0.rar') cmp_struct(dumparc(r), expect_ctime('2011-05-10T21:28:47.899345', None)) def test_rar3_ctime1(): r = rarfile.RarFile('test/files/ctime1.rar') cmp_struct(dumparc(r), expect_ctime('2011-05-10T21:28:47.899345', '2011-05-10T21:28:47')) def test_rar3_ctime2(): r = rarfile.RarFile('test/files/ctime2.rar') cmp_struct(dumparc(r), expect_ctime('2011-05-10T21:28:47.899345', '2011-05-10T21:28:47.897843')) def test_rar3_ctime3(): r = rarfile.RarFile('test/files/ctime3.rar') cmp_struct(dumparc(r), expect_ctime('2011-05-10T21:28:47.899345', '2011-05-10T21:28:47.899328')) def test_rar3_ctime4(): r = rarfile.RarFile('test/files/ctime4.rar') cmp_struct(dumparc(r), expect_ctime('2011-05-10T21:28:47.899345', '2011-05-10T21:28:47.899345')) def test_rar5_times(): r = rarfile.RarFile('test/files/rar5-times.rar') cmp_struct(dumparc(r), [mkitem( fn=u'stest1.txt', file_size=2048, compress_size=55, compress_type=rarfile.RAR_M3, extract_version=50, host_os=rarfile.RAR_OS_UNIX, mode=33188, date_time='2011-06-12 09:53:33', mtime='2011-06-12T09:53:33+00:00', atime='2016-05-22T09:12:36+00:00', CRC=3317163682 )]) def test_oldvols(): assert rarfile._next_oldvol('qq00.part0.rar') == 'qq00.part0.r00' assert rarfile._next_oldvol('qq00.part0.r00') == 'qq00.part0.r01' assert rarfile._next_oldvol('qq00.part0.r29') == 'qq00.part0.r30' assert rarfile._next_oldvol('qq00.part0.r99') == 'qq00.part0.s00' def test_newvols(): assert rarfile._next_newvol('qq00.part0.rar') == 'qq00.part1.rar' assert rarfile._next_newvol('qq00.part09.rar') == 'qq00.part10.rar' assert rarfile._next_newvol('qq00.part99.rar') == 'qq00.paru00.rar' def test_newvols_err(): with pytest.raises(rarfile.BadRarName): rarfile._next_newvol('xx.rar') rarfile-3.1/test/run_dump.sh0000755000175000017500000000144313537424015014260 0ustar hlehle#! /bin/sh PYTHON="$1" tag="$2" test -n "$tag" || { echo "usage: $0 PY TAG"; exit 1; } mkdir -p tmp diffs="tmp/output.$tag.diffs" rm -f "$diffs" quiet="" quiet="1" vprintf=printf vecho=echo if test -n "$quiet"; then echo "[$tag] testing structure dump" vprintf=true vecho=true fi result=0 for f in test/files/*.rar; do $vprintf "%s -> %-30s .. " "$tag" "$f" "$PYTHON" dumprar.py -v -ppassword "$f" > "$f.$tag" if diff -uw "$f.exp" "$f.$tag" > /dev/null; then $vecho "ok" rm -f "$f.$tag" else $vecho "FAIL" if test -n "$quiet"; then printf "[%s] %-30s .. FAILED\n" "$tag" "$f" fi echo "#### $py ####" >> "$diffs" diff -uw "$f.exp" "$f.$tag" >> "$diffs" case "$f" in *-hpsw.rar) ;; *) result=1;; esac fi done exit $result rarfile-3.1/test/test_crypto.py0000644000175000017500000000236113537421465015027 0ustar hlehle"""Crypto tests. """ from __future__ import division, print_function from binascii import unhexlify import pytest import rarfile try: from cryptography.hazmat.primitives.ciphers import algorithms, modes, Cipher from cryptography.hazmat.backends import default_backend def aes_encrypt(key, iv, data): ciph = Cipher(algorithms.AES(key), modes.CBC(iv), default_backend()) enc = ciph.encryptor() return enc.update(data) except ImportError: pass @pytest.mark.skipif(not rarfile._have_crypto, reason="No crypto") def test_aes128_cbc(): data = b'0123456789abcdef' * 2 key = b'\x02' * 16 iv = b'\x80' * 16 #encdata = aes_encrypt(key, iv, data) encdata = unhexlify('4b0d438b4a1b972bd4ab81cd64674dcce4b0158090fbe616f455354284d53502') ctx = rarfile.AES_CBC_Decrypt(key, iv) assert ctx.decrypt(encdata) == data @pytest.mark.skipif(not rarfile._have_crypto, reason="No crypto") def test_aes256_cbc(): data = b'0123456789abcdef' * 2 key = b'\x52' * 32 iv = b'\x70' * 16 #encdata = aes_encrypt(key, iv, data) encdata = unhexlify('24988f387592e4d95b6eaab013137a221f81b25aa7ecde0ef4f4d7a95f92c250') ctx = rarfile.AES_CBC_Decrypt(key, iv) assert ctx.decrypt(encdata) == data rarfile-3.1/test/test_reading.py0000644000175000017500000001073513537423573015126 0ustar hlehle"""Read all test files. """ import io from glob import glob import pytest import rarfile _done_reading = set() def run_reading_normal(fn, comment): try: rf = rarfile.RarFile(fn) except rarfile.NeedFirstVolume: return if rf.needs_password(): rf.setpassword('password') assert rf.strerror() is None assert rf.comment == comment for ifn in rf.namelist(): # full read rf.read(ifn) # read from stream item = rf.getinfo(ifn) f = rf.open(ifn) total = 0 while 1: buf = f.read(1024) if not buf: break total += len(buf) f.close() assert total == item.file_size # read from stream with readinto bbuf = bytearray(1024) with rf.open(ifn) as f: res = f.readinto(memoryview(bbuf)) if res == 0: break def run_reading_inmem(fn, comment): try: rf = rarfile.RarFile(fn) except rarfile.NeedFirstVolume: return if len(rf.volumelist()) > 1: return buf = io.open(fn, 'rb').read() run_reading_normal(io.BytesIO(buf), comment) def run_reading(fn, comment=None): _done_reading.add(fn) run_reading_normal(fn, comment) run_reading_inmem(fn, comment) def test_reading_rar3_ctime(): run_reading('test/files/ctime0.rar') run_reading('test/files/ctime1.rar') run_reading('test/files/ctime2.rar') run_reading('test/files/ctime3.rar') run_reading('test/files/ctime4.rar') def test_reading_rar2(): run_reading('test/files/rar15-comment-lock.rar', u'RARcomment -----') run_reading('test/files/rar15-comment.rar', u'RARcomment -----') run_reading('test/files/rar202-comment-nopsw.rar', u'RARcomment') def test_reading_rar3(): run_reading('test/files/rar3-comment-plain.rar', u'RARcomment\n') run_reading('test/files/seektest.rar') run_reading('test/files/unicode.rar') run_reading('test/files/unicode2.rar') def test_reading_rar2_psw(): run_reading('test/files/rar202-comment-psw.rar', u'RARcomment') def test_reading_rar3_psw(): run_reading('test/files/rar3-comment-psw.rar', u'RARcomment\n') @pytest.mark.skipif(not rarfile._have_crypto, reason="No crypto") def test_reading_rar3_hpsw(): run_reading('test/files/rar3-comment-hpsw.rar', u'RARcomment\n') @pytest.mark.skipif(rarfile._have_crypto, reason="Has crypto") def test_reading_rar3_hpsw_nocrypto(): with pytest.raises(rarfile.NoCrypto): run_reading('test/files/rar3-comment-hpsw.rar', u'RARcomment\n') def test_reading_rar3_vols(): run_reading('test/files/rar3-old.rar') run_reading('test/files/rar3-vols.part1.rar') run_reading('test/files/rar3-vols.part2.rar') run_reading('test/files/rar3-vols.part3.rar') def test_reading_rar5_blake(): run_reading('test/files/rar5-blake.rar', u'RAR5 archive - blake\n') def test_reading_rar5_crc(): run_reading('test/files/rar5-crc.rar', u'RAR5 archive - crc\n') def test_reading_rar5_links(): run_reading('test/files/rar5-dups.rar') run_reading('test/files/rar5-hlink.rar') def test_reading_rar5_quick_open(): run_reading('test/files/rar5-quick-open.rar') def test_reading_rar5_solid_qo(): run_reading('test/files/rar5-solid-qo.rar') def test_reading_rar5_solid(): run_reading('test/files/rar5-solid.rar') def test_reading_rar5_times(): run_reading('test/files/rar5-times.rar') run_reading('test/files/rar5-times2.rar') def test_reading_rar5_vols(): run_reading('test/files/rar5-vols.part1.rar') run_reading('test/files/rar5-vols.part2.rar') run_reading('test/files/rar5-vols.part3.rar') @pytest.mark.skipif(not rarfile._have_crypto, reason="No crypto") def test_reading_rar5_hpsw(): run_reading('test/files/rar5-hpsw.rar', u'RAR5 archive - hdr-password\n') @pytest.mark.skipif(rarfile._have_crypto, reason="Has crypto") def test_reading_rar5_hpsw_nocrypto(): with pytest.raises(rarfile.NoCrypto): run_reading('test/files/rar5-hpsw.rar', u'RAR5 archive - hdr-password\n') def test_reading_rar5_psw_blake(): run_reading('test/files/rar5-psw-blake.rar', u'RAR5 archive - nohdr-password-blake\n') def test_reading_rar5_psw(): run_reading('test/files/rar5-psw.rar', u'RAR5 archive - nohdr-password\n') def test_reading_missed(): problems = [] missed = [] for fn in glob('test/files/*.rar'): fn = fn.replace('\\', '/') if fn not in _done_reading: missed.append(fn) assert missed == problems rarfile-3.1/LICENSE0000644000175000017500000000136413537440715012125 0ustar hlehle Copyright (c) 2005-2019 Marko Kreen Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. rarfile-3.1/rarfile.egg-info/0000755000175000017500000000000013537441230014223 5ustar hlehlerarfile-3.1/rarfile.egg-info/top_level.txt0000644000175000017500000000001013537441230016744 0ustar hlehlerarfile rarfile-3.1/rarfile.egg-info/PKG-INFO0000644000175000017500000000402113537441230015315 0ustar hlehleMetadata-Version: 1.1 Name: rarfile Version: 3.1 Summary: RAR archive reader for Python Home-page: https://github.com/markokr/rarfile Author: Marko Kreen Author-email: markokr@gmail.com License: ISC Description: rarfile - RAR archive reader for Python ======================================= This is Python module for RAR_ archive reading. The interface is made as zipfile_ like as possible. Licensed under ISC_ license. Features: - Supports both RAR3 and RAR5 format archives. - Supports multi volume archives. - Supports Unicode filenames. - Supports password-protected archives. - Supports archive and file comments. - Archive parsing and non-compressed files are handled in pure Python code. - Compressed files are extracted by executing external tool: either ``unrar`` from RARLAB_ or ``bsdtar`` from libarchive_. - Works with both Python 2.7 and 3.x. Links: - `Documentation`_ - `Downloads`_ - `Git`_ repo .. _Git: https://github.com/markokr/rarfile .. _Downloads: https://pypi.python.org/pypi/rarfile .. _Documentation: https://rarfile.readthedocs.io/ .. _RAR: https://en.wikipedia.org/wiki/RAR_%28file_format%29 .. _zipfile: https://docs.python.org/2/library/zipfile.html .. _ISC: https://en.wikipedia.org/wiki/ISC_license .. _libarchive: https://github.com/libarchive/libarchive .. _RARLAB: http://www.rarlab.com/ Keywords: rar,unrar,archive Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: ISC License (ISCL) Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 3 Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: System :: Archiving :: Compression rarfile-3.1/rarfile.egg-info/SOURCES.txt0000644000175000017500000000473713537441230016122 0ustar hlehleLICENSE MANIFEST.in Makefile README.rst dumprar.py rarfile.py setup.py doc/Makefile doc/api.rst doc/conf.py doc/faq.rst doc/index.rst doc/make.bat doc/news.rst rarfile.egg-info/PKG-INFO rarfile.egg-info/SOURCES.txt rarfile.egg-info/dependency_links.txt rarfile.egg-info/top_level.txt test/run_dump.sh test/run_dump_all.sh test/test_api.py test/test_crypto.py test/test_format.py test/test_hashing.py test/test_korrupt.py test/test_reading.py test/test_seek.py test/files/ctime0.rar test/files/ctime0.rar.exp test/files/ctime1.rar test/files/ctime1.rar.exp test/files/ctime2.rar test/files/ctime2.rar.exp test/files/ctime3.rar test/files/ctime3.rar.exp test/files/ctime4.rar test/files/ctime4.rar.exp test/files/rar15-comment-lock.rar test/files/rar15-comment-lock.rar.exp test/files/rar15-comment.rar test/files/rar15-comment.rar.exp test/files/rar202-comment-nopsw.rar test/files/rar202-comment-nopsw.rar.exp test/files/rar202-comment-psw.rar test/files/rar202-comment-psw.rar.exp test/files/rar3-comment-hpsw.rar test/files/rar3-comment-hpsw.rar.exp test/files/rar3-comment-plain.rar test/files/rar3-comment-plain.rar.exp test/files/rar3-comment-psw.rar test/files/rar3-comment-psw.rar.exp test/files/rar3-old.r00 test/files/rar3-old.r01 test/files/rar3-old.rar test/files/rar3-old.rar.exp test/files/rar3-vols.part1.rar test/files/rar3-vols.part1.rar.exp test/files/rar3-vols.part2.rar test/files/rar3-vols.part2.rar.exp test/files/rar3-vols.part3.rar test/files/rar3-vols.part3.rar.exp test/files/rar5-blake.rar test/files/rar5-blake.rar.exp test/files/rar5-crc.rar test/files/rar5-crc.rar.exp test/files/rar5-dups.rar test/files/rar5-dups.rar.exp test/files/rar5-hlink.rar test/files/rar5-hlink.rar.exp test/files/rar5-hpsw.rar test/files/rar5-hpsw.rar.exp test/files/rar5-psw-blake.rar test/files/rar5-psw-blake.rar.exp test/files/rar5-psw.rar test/files/rar5-psw.rar.exp test/files/rar5-quick-open.rar test/files/rar5-quick-open.rar.exp test/files/rar5-solid-qo.rar test/files/rar5-solid-qo.rar.exp test/files/rar5-solid.rar test/files/rar5-solid.rar.exp test/files/rar5-times.rar test/files/rar5-times.rar.exp test/files/rar5-times2.rar test/files/rar5-times2.rar.exp test/files/rar5-vols.part1.rar test/files/rar5-vols.part1.rar.exp test/files/rar5-vols.part2.rar test/files/rar5-vols.part2.rar.exp test/files/rar5-vols.part3.rar test/files/rar5-vols.part3.rar.exp test/files/seektest.rar test/files/seektest.rar.exp test/files/unicode.rar test/files/unicode.rar.exp test/files/unicode2.rar test/files/unicode2.rar.exprarfile-3.1/rarfile.egg-info/dependency_links.txt0000644000175000017500000000000113537441230020271 0ustar hlehle rarfile-3.1/README.rst0000644000175000017500000000214213447402474012602 0ustar hlehle rarfile - RAR archive reader for Python ======================================= This is Python module for RAR_ archive reading. The interface is made as zipfile_ like as possible. Licensed under ISC_ license. Features: - Supports both RAR3 and RAR5 format archives. - Supports multi volume archives. - Supports Unicode filenames. - Supports password-protected archives. - Supports archive and file comments. - Archive parsing and non-compressed files are handled in pure Python code. - Compressed files are extracted by executing external tool: either ``unrar`` from RARLAB_ or ``bsdtar`` from libarchive_. - Works with both Python 2.7 and 3.x. Links: - `Documentation`_ - `Downloads`_ - `Git`_ repo .. _Git: https://github.com/markokr/rarfile .. _Downloads: https://pypi.python.org/pypi/rarfile .. _Documentation: https://rarfile.readthedocs.io/ .. _RAR: https://en.wikipedia.org/wiki/RAR_%28file_format%29 .. _zipfile: https://docs.python.org/2/library/zipfile.html .. _ISC: https://en.wikipedia.org/wiki/ISC_license .. _libarchive: https://github.com/libarchive/libarchive .. _RARLAB: http://www.rarlab.com/ rarfile-3.1/rarfile.py0000644000175000017500000025646113537440304013122 0ustar hlehle# rarfile.py # # Copyright (c) 2005-2019 Marko Kreen # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. r"""RAR archive reader. This is Python module for Rar archive reading. The interface is made as :mod:`zipfile`-like as possible. Basic logic: - Parse archive structure with Python. - Extract non-compressed files with Python - Extract compressed files with unrar. - Optionally write compressed data to temp file to speed up unrar, otherwise it needs to scan whole archive on each execution. Example:: import rarfile rf = rarfile.RarFile('myarchive.rar') for f in rf.infolist(): print f.filename, f.file_size if f.filename == 'README': print(rf.read(f)) Archive files can also be accessed via file-like object returned by :meth:`RarFile.open`:: import rarfile with rarfile.RarFile('archive.rar') as rf: with rf.open('README') as f: for ln in f: print(ln.strip()) There are few module-level parameters to tune behaviour, here they are with defaults, and reason to change it:: import rarfile # Set to full path of unrar.exe if it is not in PATH rarfile.UNRAR_TOOL = "unrar" # Set to '\\' to be more compatible with old rarfile rarfile.PATH_SEP = '/' For more details, refer to source. """ from __future__ import division, print_function ## ## Imports and compat - support both Python 2.x and 3.x ## import sys import os import errno import struct from struct import pack, unpack, Struct from binascii import crc32, hexlify from tempfile import mkstemp from subprocess import Popen, PIPE, STDOUT from io import RawIOBase from hashlib import sha1, sha256 from hmac import HMAC from datetime import datetime, timedelta, tzinfo # fixed offset timezone, for UTC try: from datetime import timezone except ImportError: class timezone(tzinfo): """Compat timezone.""" __slots__ = ('_ofs', '_name') _DST = timedelta(0) def __init__(self, offset, name): super(timezone, self).__init__() self._ofs, self._name = offset, name def utcoffset(self, dt): return self._ofs def tzname(self, dt): return self._name def dst(self, dt): return self._DST # only needed for encryped headers try: try: from cryptography.hazmat.primitives.ciphers import algorithms, modes, Cipher from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.kdf import pbkdf2 class AES_CBC_Decrypt(object): """Decrypt API""" def __init__(self, key, iv): ciph = Cipher(algorithms.AES(key), modes.CBC(iv), default_backend()) self.decrypt = ciph.decryptor().update def pbkdf2_sha256(password, salt, iters): """PBKDF2 with HMAC-SHA256""" ctx = pbkdf2.PBKDF2HMAC(hashes.SHA256(), 32, salt, iters, default_backend()) return ctx.derive(password) except ImportError: from Crypto.Cipher import AES from Crypto.Protocol import KDF class AES_CBC_Decrypt(object): """Decrypt API""" def __init__(self, key, iv): self.decrypt = AES.new(key, AES.MODE_CBC, iv).decrypt def pbkdf2_sha256(password, salt, iters): """PBKDF2 with HMAC-SHA256""" return KDF.PBKDF2(password, salt, 32, iters, hmac_sha256) _have_crypto = 1 except ImportError: _have_crypto = 0 try: try: from hashlib import blake2s _have_blake2 = True except ImportError: from pyblake2 import blake2s _have_blake2 = True except ImportError: _have_blake2 = False # compat with 2.x if sys.hexversion < 0x3000000: def rar_crc32(data, prev=0): """CRC32 with unsigned values. """ if (prev > 0) and (prev & 0x80000000): prev -= (1 << 32) res = crc32(data, prev) if res < 0: res += (1 << 32) return res tohex = hexlify _byte_code = ord else: # pragma: no cover def tohex(data): """Return hex string.""" return hexlify(data).decode('ascii') rar_crc32 = crc32 unicode = str _byte_code = int # noqa # don't break 2.6 completely if sys.hexversion < 0x2070000: memoryview = lambda x: x # noqa try: from pathlib import Path _have_pathlib = True except ImportError: _have_pathlib = False __version__ = '3.1' # export only interesting items __all__ = ['is_rarfile', 'RarInfo', 'RarFile', 'RarExtFile'] ## ## Module configuration. Can be tuned after importing. ## #: default fallback charset DEFAULT_CHARSET = "windows-1252" #: list of encodings to try, with fallback to DEFAULT_CHARSET if none succeed TRY_ENCODINGS = ('utf8', 'utf-16le') #: 'unrar', 'rar' or full path to either one UNRAR_TOOL = "unrar" #: Command line args to use for opening file for reading. OPEN_ARGS = ('p', '-inul') #: Command line args to use for extracting file to disk. EXTRACT_ARGS = ('x', '-y', '-idq') #: args for testrar() TEST_ARGS = ('t', '-idq') # # Allow use of tool that is not compatible with unrar. # # By default use 'bsdtar' which is 'tar' program that # sits on top of libarchive. # # Problems with libarchive RAR backend: # - Does not support solid archives. # - Does not support password-protected archives. # ALT_TOOL = 'bsdtar' ALT_OPEN_ARGS = ('-x', '--to-stdout', '-f') ALT_EXTRACT_ARGS = ('-x', '-f') ALT_TEST_ARGS = ('-t', '-f') ALT_CHECK_ARGS = ('--help',) #ALT_TOOL = 'unar' #ALT_OPEN_ARGS = ('-o', '-') #ALT_EXTRACT_ARGS = () #ALT_TEST_ARGS = ('-test',) # does not work #ALT_CHECK_ARGS = ('-v',) #: whether to speed up decompression by using tmp archive USE_EXTRACT_HACK = 1 #: limit the filesize for tmp archive usage HACK_SIZE_LIMIT = 20 * 1024 * 1024 #: Separator for path name components. RAR internally uses '\\'. #: Use '/' to be similar with zipfile. PATH_SEP = '/' ## ## rar constants ## # block types RAR_BLOCK_MARK = 0x72 # r RAR_BLOCK_MAIN = 0x73 # s RAR_BLOCK_FILE = 0x74 # t RAR_BLOCK_OLD_COMMENT = 0x75 # u RAR_BLOCK_OLD_EXTRA = 0x76 # v RAR_BLOCK_OLD_SUB = 0x77 # w RAR_BLOCK_OLD_RECOVERY = 0x78 # x RAR_BLOCK_OLD_AUTH = 0x79 # y RAR_BLOCK_SUB = 0x7a # z RAR_BLOCK_ENDARC = 0x7b # { # flags for RAR_BLOCK_MAIN RAR_MAIN_VOLUME = 0x0001 RAR_MAIN_COMMENT = 0x0002 RAR_MAIN_LOCK = 0x0004 RAR_MAIN_SOLID = 0x0008 RAR_MAIN_NEWNUMBERING = 0x0010 RAR_MAIN_AUTH = 0x0020 RAR_MAIN_RECOVERY = 0x0040 RAR_MAIN_PASSWORD = 0x0080 RAR_MAIN_FIRSTVOLUME = 0x0100 RAR_MAIN_ENCRYPTVER = 0x0200 # flags for RAR_BLOCK_FILE RAR_FILE_SPLIT_BEFORE = 0x0001 RAR_FILE_SPLIT_AFTER = 0x0002 RAR_FILE_PASSWORD = 0x0004 RAR_FILE_COMMENT = 0x0008 RAR_FILE_SOLID = 0x0010 RAR_FILE_DICTMASK = 0x00e0 RAR_FILE_DICT64 = 0x0000 RAR_FILE_DICT128 = 0x0020 RAR_FILE_DICT256 = 0x0040 RAR_FILE_DICT512 = 0x0060 RAR_FILE_DICT1024 = 0x0080 RAR_FILE_DICT2048 = 0x00a0 RAR_FILE_DICT4096 = 0x00c0 RAR_FILE_DIRECTORY = 0x00e0 RAR_FILE_LARGE = 0x0100 RAR_FILE_UNICODE = 0x0200 RAR_FILE_SALT = 0x0400 RAR_FILE_VERSION = 0x0800 RAR_FILE_EXTTIME = 0x1000 RAR_FILE_EXTFLAGS = 0x2000 # flags for RAR_BLOCK_ENDARC RAR_ENDARC_NEXT_VOLUME = 0x0001 RAR_ENDARC_DATACRC = 0x0002 RAR_ENDARC_REVSPACE = 0x0004 RAR_ENDARC_VOLNR = 0x0008 # flags common to all blocks RAR_SKIP_IF_UNKNOWN = 0x4000 RAR_LONG_BLOCK = 0x8000 # Host OS types RAR_OS_MSDOS = 0 RAR_OS_OS2 = 1 RAR_OS_WIN32 = 2 RAR_OS_UNIX = 3 RAR_OS_MACOS = 4 RAR_OS_BEOS = 5 # Compression methods - '0'..'5' RAR_M0 = 0x30 RAR_M1 = 0x31 RAR_M2 = 0x32 RAR_M3 = 0x33 RAR_M4 = 0x34 RAR_M5 = 0x35 # # RAR5 constants # RAR5_BLOCK_MAIN = 1 RAR5_BLOCK_FILE = 2 RAR5_BLOCK_SERVICE = 3 RAR5_BLOCK_ENCRYPTION = 4 RAR5_BLOCK_ENDARC = 5 RAR5_BLOCK_FLAG_EXTRA_DATA = 0x01 RAR5_BLOCK_FLAG_DATA_AREA = 0x02 RAR5_BLOCK_FLAG_SKIP_IF_UNKNOWN = 0x04 RAR5_BLOCK_FLAG_SPLIT_BEFORE = 0x08 RAR5_BLOCK_FLAG_SPLIT_AFTER = 0x10 RAR5_BLOCK_FLAG_DEPENDS_PREV = 0x20 RAR5_BLOCK_FLAG_KEEP_WITH_PARENT = 0x40 RAR5_MAIN_FLAG_ISVOL = 0x01 RAR5_MAIN_FLAG_HAS_VOLNR = 0x02 RAR5_MAIN_FLAG_SOLID = 0x04 RAR5_MAIN_FLAG_RECOVERY = 0x08 RAR5_MAIN_FLAG_LOCKED = 0x10 RAR5_FILE_FLAG_ISDIR = 0x01 RAR5_FILE_FLAG_HAS_MTIME = 0x02 RAR5_FILE_FLAG_HAS_CRC32 = 0x04 RAR5_FILE_FLAG_UNKNOWN_SIZE = 0x08 RAR5_COMPR_SOLID = 0x40 RAR5_ENC_FLAG_HAS_CHECKVAL = 0x01 RAR5_ENDARC_FLAG_NEXT_VOL = 0x01 RAR5_XFILE_ENCRYPTION = 1 RAR5_XFILE_HASH = 2 RAR5_XFILE_TIME = 3 RAR5_XFILE_VERSION = 4 RAR5_XFILE_REDIR = 5 RAR5_XFILE_OWNER = 6 RAR5_XFILE_SERVICE = 7 RAR5_XTIME_UNIXTIME = 0x01 RAR5_XTIME_HAS_MTIME = 0x02 RAR5_XTIME_HAS_CTIME = 0x04 RAR5_XTIME_HAS_ATIME = 0x08 RAR5_XENC_CIPHER_AES256 = 0 RAR5_XENC_CHECKVAL = 0x01 RAR5_XENC_TWEAKED = 0x02 RAR5_XHASH_BLAKE2SP = 0 RAR5_XREDIR_UNIX_SYMLINK = 1 RAR5_XREDIR_WINDOWS_SYMLINK = 2 RAR5_XREDIR_WINDOWS_JUNCTION = 3 RAR5_XREDIR_HARD_LINK = 4 RAR5_XREDIR_FILE_COPY = 5 RAR5_XREDIR_ISDIR = 0x01 RAR5_XOWNER_UNAME = 0x01 RAR5_XOWNER_GNAME = 0x02 RAR5_XOWNER_UID = 0x04 RAR5_XOWNER_GID = 0x08 RAR5_OS_WINDOWS = 0 RAR5_OS_UNIX = 1 ## ## internal constants ## RAR_ID = b"Rar!\x1a\x07\x00" RAR5_ID = b"Rar!\x1a\x07\x01\x00" ZERO = b'\0' EMPTY = b'' UTC = timezone(timedelta(0), 'UTC') BSIZE = 32 * 1024 def _get_rar_version(xfile): """Check quickly whether file is rar archive. """ with XFile(xfile) as fd: buf = fd.read(len(RAR5_ID)) if buf.startswith(RAR_ID): return 3 elif buf.startswith(RAR5_ID): return 5 return 0 ## ## Public interface ## def is_rarfile(xfile): """Check quickly whether file is rar archive. """ return _get_rar_version(xfile) > 0 class Error(Exception): """Base class for rarfile errors.""" class BadRarFile(Error): """Incorrect data in archive.""" class NotRarFile(Error): """The file is not RAR archive.""" class BadRarName(Error): """Cannot guess multipart name components.""" class NoRarEntry(Error): """File not found in RAR""" class PasswordRequired(Error): """File requires password""" class NeedFirstVolume(Error): """Need to start from first volume.""" class NoCrypto(Error): """Cannot parse encrypted headers - no crypto available.""" class RarExecError(Error): """Problem reported by unrar/rar.""" class RarWarning(RarExecError): """Non-fatal error""" class RarFatalError(RarExecError): """Fatal error""" class RarCRCError(RarExecError): """CRC error during unpacking""" class RarLockedArchiveError(RarExecError): """Must not modify locked archive""" class RarWriteError(RarExecError): """Write error""" class RarOpenError(RarExecError): """Open error""" class RarUserError(RarExecError): """User error""" class RarMemoryError(RarExecError): """Memory error""" class RarCreateError(RarExecError): """Create error""" class RarNoFilesError(RarExecError): """No files that match pattern were found""" class RarUserBreak(RarExecError): """User stop""" class RarWrongPassword(RarExecError): """Incorrect password""" class RarUnknownError(RarExecError): """Unknown exit code""" class RarSignalExit(RarExecError): """Unrar exited with signal""" class RarCannotExec(RarExecError): """Executable not found.""" class RarInfo(object): r"""An entry in rar archive. RAR3 extended timestamps are :class:`datetime.datetime` objects without timezone. RAR5 extended timestamps are :class:`datetime.datetime` objects with UTC timezone. Attributes: filename File name with relative path. Path separator is '/'. Always unicode string. date_time File modification timestamp. As tuple of (year, month, day, hour, minute, second). RAR5 allows archives where it is missing, it's None then. file_size Uncompressed size. compress_size Compressed size. compress_type Compression method: one of :data:`RAR_M0` .. :data:`RAR_M5` constants. extract_version Minimal Rar version needed for decompressing. As (major*10 + minor), so 2.9 is 29. RAR3: 10, 20, 29 RAR5 does not have such field in archive, it's simply set to 50. host_os Host OS type, one of RAR_OS_* constants. RAR3: :data:`RAR_OS_WIN32`, :data:`RAR_OS_UNIX`, :data:`RAR_OS_MSDOS`, :data:`RAR_OS_OS2`, :data:`RAR_OS_BEOS`. RAR5: :data:`RAR_OS_WIN32`, :data:`RAR_OS_UNIX`. mode File attributes. May be either dos-style or unix-style, depending on host_os. mtime File modification time. Same value as :attr:`date_time` but as :class:`datetime.datetime` object with extended precision. ctime Optional time field: creation time. As :class:`datetime.datetime` object. atime Optional time field: last access time. As :class:`datetime.datetime` object. arctime Optional time field: archival time. As :class:`datetime.datetime` object. (RAR3-only) CRC CRC-32 of uncompressed file, unsigned int. RAR5: may be None. blake2sp_hash Blake2SP hash over decompressed data. (RAR5-only) comment Optional file comment field. Unicode string. (RAR3-only) file_redir If not None, file is link of some sort. Contains tuple of (type, flags, target). (RAR5-only) Type is one of constants: :data:`RAR5_XREDIR_UNIX_SYMLINK` unix symlink to target. :data:`RAR5_XREDIR_WINDOWS_SYMLINK` windows symlink to target. :data:`RAR5_XREDIR_WINDOWS_JUNCTION` windows junction. :data:`RAR5_XREDIR_HARD_LINK` hard link to target. :data:`RAR5_XREDIR_FILE_COPY` current file is copy of another archive entry. Flags may contain :data:`RAR5_XREDIR_ISDIR` bit. volume Volume nr, starting from 0. volume_file Volume file name, where file starts. """ # zipfile-compatible fields filename = None file_size = None compress_size = None date_time = None comment = None CRC = None volume = None orig_filename = None # optional extended time fields, datetime() objects. mtime = None ctime = None atime = None extract_version = None mode = None host_os = None compress_type = None # rar3-only fields comment = None arctime = None # rar5-only fields blake2sp_hash = None file_redir = None # internal fields flags = 0 type = None def isdir(self): """Returns True if entry is a directory. """ if self.type == RAR_BLOCK_FILE: return (self.flags & RAR_FILE_DIRECTORY) == RAR_FILE_DIRECTORY return False def needs_password(self): """Returns True if data is stored password-protected. """ if self.type == RAR_BLOCK_FILE: return (self.flags & RAR_FILE_PASSWORD) > 0 return False class RarFile(object): """Parse RAR structure, provide access to files in archive. """ #: Archive comment. Unicode string or None. comment = None def __init__(self, rarfile, mode="r", charset=None, info_callback=None, crc_check=True, errors="stop"): """Open and parse a RAR archive. Parameters: rarfile archive file name mode only 'r' is supported. charset fallback charset to use, if filenames are not already Unicode-enabled. info_callback debug callback, gets to see all archive entries. crc_check set to False to disable CRC checks errors Either "stop" to quietly stop parsing on errors, or "strict" to raise errors. Default is "stop". """ if _have_pathlib and isinstance(rarfile, Path): self._rarfile = str(rarfile) else: self._rarfile = rarfile self._charset = charset or DEFAULT_CHARSET self._info_callback = info_callback self._crc_check = crc_check self._password = None self._file_parser = None if errors == "stop": self._strict = False elif errors == "strict": self._strict = True else: raise ValueError("Invalid value for 'errors' parameter.") if mode != "r": raise NotImplementedError("RarFile supports only mode=r") self._parse() def __enter__(self): """Open context.""" return self def __exit__(self, typ, value, traceback): """Exit context""" self.close() def setpassword(self, password): """Sets the password to use when extracting. """ self._password = password if self._file_parser: if self._file_parser.has_header_encryption(): self._file_parser = None if not self._file_parser: self._parse() else: self._file_parser.setpassword(self._password) def needs_password(self): """Returns True if any archive entries require password for extraction. """ return self._file_parser.needs_password() def namelist(self): """Return list of filenames in archive. """ return [f.filename for f in self.infolist()] def infolist(self): """Return RarInfo objects for all files/directories in archive. """ return self._file_parser.infolist() def volumelist(self): """Returns filenames of archive volumes. In case of single-volume archive, the list contains just the name of main archive file. """ return self._file_parser.volumelist() def getinfo(self, fname): """Return RarInfo for file. """ return self._file_parser.getinfo(fname) def open(self, fname, mode='r', psw=None): """Returns file-like object (:class:`RarExtFile`) from where the data can be read. The object implements :class:`io.RawIOBase` interface, so it can be further wrapped with :class:`io.BufferedReader` and :class:`io.TextIOWrapper`. On older Python where io module is not available, it implements only .read(), .seek(), .tell() and .close() methods. The object is seekable, although the seeking is fast only on uncompressed files, on compressed files the seeking is implemented by reading ahead and/or restarting the decompression. Parameters: fname file name or RarInfo instance. mode must be 'r' psw password to use for extracting. """ if mode != 'r': raise NotImplementedError("RarFile.open() supports only mode=r") # entry lookup inf = self.getinfo(fname) if inf.isdir(): raise TypeError("Directory does not have any data: " + inf.filename) # check password if inf.needs_password(): psw = psw or self._password if psw is None: raise PasswordRequired("File %s requires password" % inf.filename) else: psw = None return self._file_parser.open(inf, psw) def read(self, fname, psw=None): """Return uncompressed data for archive entry. For longer files using :meth:`RarFile.open` may be better idea. Parameters: fname filename or RarInfo instance psw password to use for extracting. """ with self.open(fname, 'r', psw) as f: return f.read() def close(self): """Release open resources.""" pass def printdir(self): """Print archive file list to stdout.""" for f in self.infolist(): print(f.filename) def extract(self, member, path=None, pwd=None): """Extract single file into current directory. Parameters: member filename or :class:`RarInfo` instance path optional destination path pwd optional password to use """ if isinstance(member, RarInfo): fname = member.filename elif _have_pathlib and isinstance(member, Path): fname = str(member) else: fname = member self._extract([fname], path, pwd) def extractall(self, path=None, members=None, pwd=None): """Extract all files into current directory. Parameters: path optional destination path members optional filename or :class:`RarInfo` instance list to extract pwd optional password to use """ fnlist = [] if members is not None: for m in members: if isinstance(m, RarInfo): fnlist.append(m.filename) else: fnlist.append(m) self._extract(fnlist, path, pwd) def testrar(self): """Let 'unrar' test the archive. """ cmd = [UNRAR_TOOL] + list(TEST_ARGS) add_password_arg(cmd, self._password) cmd.append('--') with XTempFile(self._rarfile) as rarfile: cmd.append(rarfile) p = custom_popen(cmd) output = p.communicate()[0] check_returncode(p, output) def strerror(self): """Return error string if parsing failed or None if no problems. """ if not self._file_parser: return "Not a RAR file" return self._file_parser.strerror() ## ## private methods ## def _parse(self): ver = _get_rar_version(self._rarfile) if ver == 3: p3 = RAR3Parser(self._rarfile, self._password, self._crc_check, self._charset, self._strict, self._info_callback) self._file_parser = p3 # noqa elif ver == 5: p5 = RAR5Parser(self._rarfile, self._password, self._crc_check, self._charset, self._strict, self._info_callback) self._file_parser = p5 # noqa else: raise BadRarFile("Not a RAR file") self._file_parser.parse() self.comment = self._file_parser.comment # call unrar to extract a file def _extract(self, fnlist, path=None, psw=None): cmd = [UNRAR_TOOL] + list(EXTRACT_ARGS) # pasoword psw = psw or self._password add_password_arg(cmd, psw) cmd.append('--') # rar file with XTempFile(self._rarfile) as rarfn: cmd.append(rarfn) # file list for fn in fnlist: if os.sep != PATH_SEP: fn = fn.replace(PATH_SEP, os.sep) cmd.append(fn) # destination path if path is not None: if _have_pathlib and isinstance(path, Path): path = str(path) cmd.append(path + os.sep) # call p = custom_popen(cmd) output = p.communicate()[0] check_returncode(p, output) # # File format parsing # class CommonParser(object): """Shared parser parts.""" _main = None _hdrenc_main = None _needs_password = False _fd = None _expect_sig = None _parse_error = None _password = None comment = None def __init__(self, rarfile, password, crc_check, charset, strict, info_cb): self._rarfile = rarfile self._password = password self._crc_check = crc_check self._charset = charset self._strict = strict self._info_callback = info_cb self._info_list = [] self._info_map = {} self._vol_list = [] def has_header_encryption(self): """Returns True if headers are encrypted """ if self._hdrenc_main: return True if self._main: if self._main.flags & RAR_MAIN_PASSWORD: return True return False def setpassword(self, psw): """Set cached password.""" self._password = psw def volumelist(self): """Volume files""" return self._vol_list def needs_password(self): """Is password required""" return self._needs_password def strerror(self): """Last error""" return self._parse_error def infolist(self): """List of RarInfo records. """ return self._info_list def getinfo(self, member): """Return RarInfo for filename """ if isinstance(member, RarInfo): fname = member.filename elif _have_pathlib and isinstance(member, Path): fname = str(member) else: fname = member # accept both ways here if PATH_SEP == '/': fname2 = fname.replace("\\", "/") else: fname2 = fname.replace("/", "\\") try: return self._info_map[fname] except KeyError: try: return self._info_map[fname2] except KeyError: raise NoRarEntry("No such file: %s" % fname) # read rar def parse(self): """Process file.""" self._fd = None try: self._parse_real() finally: if self._fd: self._fd.close() self._fd = None def _parse_real(self): fd = XFile(self._rarfile) self._fd = fd sig = fd.read(len(self._expect_sig)) if sig != self._expect_sig: if isinstance(self._rarfile, (str, unicode)): raise NotRarFile("Not a Rar archive: {}".format(self._rarfile)) raise NotRarFile("Not a Rar archive") volume = 0 # first vol (.rar) is 0 more_vols = False endarc = False volfile = self._rarfile self._vol_list = [self._rarfile] while 1: if endarc: h = None # don't read past ENDARC else: h = self._parse_header(fd) if not h: if more_vols: volume += 1 fd.close() try: volfile = self._next_volname(volfile) fd = XFile(volfile) except IOError: self._set_error("Cannot open next volume: %s", volfile) break self._fd = fd sig = fd.read(len(self._expect_sig)) if sig != self._expect_sig: self._set_error("Invalid volume sig: %s", volfile) break more_vols = False endarc = False self._vol_list.append(volfile) continue break h.volume = volume h.volume_file = volfile if h.type == RAR_BLOCK_MAIN and not self._main: self._main = h if h.flags & RAR_MAIN_NEWNUMBERING: # RAR 2.x does not set FIRSTVOLUME, # so check it only if NEWNUMBERING is used if (h.flags & RAR_MAIN_FIRSTVOLUME) == 0: if getattr(h, 'main_volume_number', None) is not None: # rar5 may have more info raise NeedFirstVolume( "Need to start from first volume (current: %r)" % (h.main_volume_number,) ) raise NeedFirstVolume("Need to start from first volume") if h.flags & RAR_MAIN_PASSWORD: self._needs_password = True if not self._password: break elif h.type == RAR_BLOCK_ENDARC: more_vols = (h.flags & RAR_ENDARC_NEXT_VOLUME) > 0 endarc = True elif h.type == RAR_BLOCK_FILE: # RAR 2.x does not write RAR_BLOCK_ENDARC if h.flags & RAR_FILE_SPLIT_AFTER: more_vols = True # RAR 2.x does not set RAR_MAIN_FIRSTVOLUME if volume == 0 and h.flags & RAR_FILE_SPLIT_BEFORE: raise NeedFirstVolume("Need to start from first volume") if h.needs_password(): self._needs_password = True # store it self.process_entry(fd, h) if self._info_callback: self._info_callback(h) # go to next header if h.add_size > 0: fd.seek(h.data_offset + h.add_size, 0) def process_entry(self, fd, item): """Examine item, add into lookup cache.""" raise NotImplementedError() def _decrypt_header(self, fd): raise NotImplementedError('_decrypt_header') def _parse_block_header(self, fd): raise NotImplementedError('_parse_block_header') def _open_hack(self, inf, psw): raise NotImplementedError('_open_hack') # read single header def _parse_header(self, fd): try: # handle encrypted headers if (self._main and self._main.flags & RAR_MAIN_PASSWORD) or self._hdrenc_main: if not self._password: return None fd = self._decrypt_header(fd) # now read actual header return self._parse_block_header(fd) except struct.error: self._set_error('Broken header in RAR file') return None # given current vol name, construct next one def _next_volname(self, volfile): if is_filelike(volfile): raise IOError("Working on single FD") if self._main.flags & RAR_MAIN_NEWNUMBERING: return _next_newvol(volfile) return _next_oldvol(volfile) def _set_error(self, msg, *args): if args: msg = msg % args self._parse_error = msg if self._strict: raise BadRarFile(msg) def open(self, inf, psw): """Return stream object for file data.""" if inf.file_redir: # cannot leave to unrar as it expects copied file to exist if inf.file_redir[0] in (RAR5_XREDIR_FILE_COPY, RAR5_XREDIR_HARD_LINK): inf = self.getinfo(inf.file_redir[2]) if not inf: raise BadRarFile('cannot find copied file') if inf.flags & RAR_FILE_SPLIT_BEFORE: raise NeedFirstVolume("Partial file, please start from first volume: " + inf.filename) # is temp write usable? use_hack = 1 if not self._main: use_hack = 0 elif self._main._must_disable_hack(): use_hack = 0 elif inf._must_disable_hack(): use_hack = 0 elif is_filelike(self._rarfile): pass elif inf.file_size > HACK_SIZE_LIMIT: use_hack = 0 elif not USE_EXTRACT_HACK: use_hack = 0 # now extract if inf.compress_type == RAR_M0 and (inf.flags & RAR_FILE_PASSWORD) == 0 and inf.file_redir is None: return self._open_clear(inf) elif use_hack: return self._open_hack(inf, psw) elif is_filelike(self._rarfile): return self._open_unrar_membuf(self._rarfile, inf, psw) else: return self._open_unrar(self._rarfile, inf, psw) def _open_clear(self, inf): return DirectReader(self, inf) def _open_hack_core(self, inf, psw, prefix, suffix): size = inf.compress_size + inf.header_size rf = XFile(inf.volume_file, 0) rf.seek(inf.header_offset) tmpfd, tmpname = mkstemp(suffix='.rar') tmpf = os.fdopen(tmpfd, "wb") try: tmpf.write(prefix) while size > 0: if size > BSIZE: buf = rf.read(BSIZE) else: buf = rf.read(size) if not buf: raise BadRarFile('read failed: ' + inf.filename) tmpf.write(buf) size -= len(buf) tmpf.write(suffix) tmpf.close() rf.close() except: rf.close() tmpf.close() os.unlink(tmpname) raise return self._open_unrar(tmpname, inf, psw, tmpname) # write in-memory archive to temp file - needed for solid archives def _open_unrar_membuf(self, memfile, inf, psw): tmpname = membuf_tempfile(memfile) return self._open_unrar(tmpname, inf, psw, tmpname, force_file=True) # extract using unrar def _open_unrar(self, rarfile, inf, psw=None, tmpfile=None, force_file=False): cmd = [UNRAR_TOOL] + list(OPEN_ARGS) add_password_arg(cmd, psw) cmd.append("--") cmd.append(rarfile) # not giving filename avoids encoding related problems if not tmpfile or force_file: fn = inf.filename if PATH_SEP != os.sep: fn = fn.replace(PATH_SEP, os.sep) cmd.append(fn) # read from unrar pipe return PipeReader(self, inf, cmd, tmpfile) # # RAR3 format # class Rar3Info(RarInfo): """RAR3 specific fields.""" extract_version = 15 salt = None add_size = 0 header_crc = None header_size = None header_offset = None data_offset = None _md_class = None _md_expect = None # make sure some rar5 fields are always present file_redir = None blake2sp_hash = None def _must_disable_hack(self): if self.type == RAR_BLOCK_FILE: if self.flags & RAR_FILE_PASSWORD: return True elif self.flags & (RAR_FILE_SPLIT_BEFORE | RAR_FILE_SPLIT_AFTER): return True elif self.type == RAR_BLOCK_MAIN: if self.flags & (RAR_MAIN_SOLID | RAR_MAIN_PASSWORD): return True return False class RAR3Parser(CommonParser): """Parse RAR3 file format. """ _expect_sig = RAR_ID _last_aes_key = (None, None, None) # (salt, key, iv) def _decrypt_header(self, fd): if not _have_crypto: raise NoCrypto('Cannot parse encrypted headers - no crypto') salt = fd.read(8) if self._last_aes_key[0] == salt: key, iv = self._last_aes_key[1:] else: key, iv = rar3_s2k(self._password, salt) self._last_aes_key = (salt, key, iv) return HeaderDecrypt(fd, key, iv) # common header def _parse_block_header(self, fd): h = Rar3Info() h.header_offset = fd.tell() # read and parse base header buf = fd.read(S_BLK_HDR.size) if not buf: return None t = S_BLK_HDR.unpack_from(buf) h.header_crc, h.type, h.flags, h.header_size = t # read full header if h.header_size > S_BLK_HDR.size: hdata = buf + fd.read(h.header_size - S_BLK_HDR.size) else: hdata = buf h.data_offset = fd.tell() # unexpected EOF? if len(hdata) != h.header_size: self._set_error('Unexpected EOF when reading header') return None pos = S_BLK_HDR.size # block has data assiciated with it? if h.flags & RAR_LONG_BLOCK: h.add_size, pos = load_le32(hdata, pos) else: h.add_size = 0 # parse interesting ones, decide header boundaries for crc if h.type == RAR_BLOCK_MARK: return h elif h.type == RAR_BLOCK_MAIN: pos += 6 if h.flags & RAR_MAIN_ENCRYPTVER: pos += 1 crc_pos = pos if h.flags & RAR_MAIN_COMMENT: self._parse_subblocks(h, hdata, pos) elif h.type == RAR_BLOCK_FILE: pos = self._parse_file_header(h, hdata, pos - 4) crc_pos = pos if h.flags & RAR_FILE_COMMENT: pos = self._parse_subblocks(h, hdata, pos) elif h.type == RAR_BLOCK_SUB: pos = self._parse_file_header(h, hdata, pos - 4) crc_pos = h.header_size elif h.type == RAR_BLOCK_OLD_AUTH: pos += 8 crc_pos = pos elif h.type == RAR_BLOCK_OLD_EXTRA: pos += 7 crc_pos = pos else: crc_pos = h.header_size # check crc if h.type == RAR_BLOCK_OLD_SUB: crcdat = hdata[2:] + fd.read(h.add_size) else: crcdat = hdata[2:crc_pos] calc_crc = rar_crc32(crcdat) & 0xFFFF # return good header if h.header_crc == calc_crc: return h # header parsing failed. self._set_error('Header CRC error (%02x): exp=%x got=%x (xlen = %d)', h.type, h.header_crc, calc_crc, len(crcdat)) # instead panicing, send eof return None # read file-specific header def _parse_file_header(self, h, hdata, pos): fld = S_FILE_HDR.unpack_from(hdata, pos) pos += S_FILE_HDR.size h.compress_size = fld[0] h.file_size = fld[1] h.host_os = fld[2] h.CRC = fld[3] h.date_time = parse_dos_time(fld[4]) h.mtime = to_datetime(h.date_time) h.extract_version = fld[5] h.compress_type = fld[6] name_size = fld[7] h.mode = fld[8] h._md_class = CRC32Context h._md_expect = h.CRC if h.flags & RAR_FILE_LARGE: h1, pos = load_le32(hdata, pos) h2, pos = load_le32(hdata, pos) h.compress_size |= h1 << 32 h.file_size |= h2 << 32 h.add_size = h.compress_size name, pos = load_bytes(hdata, name_size, pos) if h.flags & RAR_FILE_UNICODE: nul = name.find(ZERO) h.orig_filename = name[:nul] u = UnicodeFilename(h.orig_filename, name[nul + 1:]) h.filename = u.decode() # if parsing failed fall back to simple name if u.failed: h.filename = self._decode(h.orig_filename) else: h.orig_filename = name h.filename = self._decode(name) # change separator, if requested if PATH_SEP != '\\': h.filename = h.filename.replace('\\', PATH_SEP) if h.flags & RAR_FILE_SALT: h.salt, pos = load_bytes(hdata, 8, pos) else: h.salt = None # optional extended time stamps if h.flags & RAR_FILE_EXTTIME: pos = _parse_ext_time(h, hdata, pos) else: h.mtime = h.atime = h.ctime = h.arctime = None return pos # find old-style comment subblock def _parse_subblocks(self, h, hdata, pos): while pos < len(hdata): # ordinary block header t = S_BLK_HDR.unpack_from(hdata, pos) ___scrc, stype, sflags, slen = t pos_next = pos + slen pos += S_BLK_HDR.size # corrupt header if pos_next < pos: break # followed by block-specific header if stype == RAR_BLOCK_OLD_COMMENT and pos + S_COMMENT_HDR.size <= pos_next: declen, ver, meth, crc = S_COMMENT_HDR.unpack_from(hdata, pos) pos += S_COMMENT_HDR.size data = hdata[pos : pos_next] cmt = rar3_decompress(ver, meth, data, declen, sflags, crc, self._password) if not self._crc_check: h.comment = self._decode_comment(cmt) elif rar_crc32(cmt) & 0xFFFF == crc: h.comment = self._decode_comment(cmt) pos = pos_next return pos def _read_comment_v3(self, inf, psw=None): # read data with XFile(inf.volume_file) as rf: rf.seek(inf.data_offset) data = rf.read(inf.compress_size) # decompress cmt = rar3_decompress(inf.extract_version, inf.compress_type, data, inf.file_size, inf.flags, inf.CRC, psw, inf.salt) # check crc if self._crc_check: crc = rar_crc32(cmt) if crc != inf.CRC: return None return self._decode_comment(cmt) def _decode(self, val): for c in TRY_ENCODINGS: try: return val.decode(c) except UnicodeError: pass return val.decode(self._charset, 'replace') def _decode_comment(self, val): return self._decode(val) def process_entry(self, fd, item): if item.type == RAR_BLOCK_FILE: # use only first part if (item.flags & RAR_FILE_SPLIT_BEFORE) == 0: self._info_map[item.filename] = item self._info_list.append(item) elif len(self._info_list) > 0: # final crc is in last block old = self._info_list[-1] old.CRC = item.CRC old._md_expect = item._md_expect old.compress_size += item.compress_size # parse new-style comment if item.type == RAR_BLOCK_SUB and item.filename == 'CMT': if item.flags & (RAR_FILE_SPLIT_BEFORE | RAR_FILE_SPLIT_AFTER): pass elif item.flags & RAR_FILE_SOLID: # file comment cmt = self._read_comment_v3(item, self._password) if len(self._info_list) > 0: old = self._info_list[-1] old.comment = cmt else: # archive comment cmt = self._read_comment_v3(item, self._password) self.comment = cmt if item.type == RAR_BLOCK_MAIN: if item.flags & RAR_MAIN_COMMENT: self.comment = item.comment if item.flags & RAR_MAIN_PASSWORD: self._needs_password = True # put file compressed data into temporary .rar archive, and run # unrar on that, thus avoiding unrar going over whole archive def _open_hack(self, inf, psw): # create main header: crc, type, flags, size, res1, res2 prefix = RAR_ID + S_BLK_HDR.pack(0x90CF, 0x73, 0, 13) + ZERO * (2 + 4) return self._open_hack_core(inf, psw, prefix, EMPTY) # # RAR5 format # class Rar5Info(RarInfo): """Shared fields for RAR5 records. """ extract_version = 50 header_crc = None header_size = None header_offset = None data_offset = None # type=all block_type = None block_flags = None add_size = 0 block_extra_size = 0 # type=MAIN volume_number = None _md_class = None _md_expect = None def _must_disable_hack(self): return False class Rar5BaseFile(Rar5Info): """Shared sturct for file & service record. """ type = -1 file_flags = None file_encryption = (0, 0, 0, EMPTY, EMPTY, EMPTY) file_compress_flags = None file_redir = None file_owner = None file_version = None blake2sp_hash = None def _must_disable_hack(self): if self.flags & RAR_FILE_PASSWORD: return True if self.block_flags & (RAR5_BLOCK_FLAG_SPLIT_BEFORE | RAR5_BLOCK_FLAG_SPLIT_AFTER): return True if self.file_compress_flags & RAR5_COMPR_SOLID: return True if self.file_redir: return True return False class Rar5FileInfo(Rar5BaseFile): """RAR5 file record. """ type = RAR_BLOCK_FILE class Rar5ServiceInfo(Rar5BaseFile): """RAR5 service record. """ type = RAR_BLOCK_SUB class Rar5MainInfo(Rar5Info): """RAR5 archive main record. """ type = RAR_BLOCK_MAIN main_flags = None main_volume_number = None def _must_disable_hack(self): if self.main_flags & RAR5_MAIN_FLAG_SOLID: return True return False class Rar5EncryptionInfo(Rar5Info): """RAR5 archive header encryption record. """ type = RAR5_BLOCK_ENCRYPTION encryption_algo = None encryption_flags = None encryption_kdf_count = None encryption_salt = None encryption_check_value = None def needs_password(self): return True class Rar5EndArcInfo(Rar5Info): """RAR5 end of archive record. """ type = RAR_BLOCK_ENDARC endarc_flags = None class RAR5Parser(CommonParser): """Parse RAR5 format. """ _expect_sig = RAR5_ID _hdrenc_main = None # AES encrypted headers _last_aes256_key = (-1, None, None) # (kdf_count, salt, key) def _gen_key(self, kdf_count, salt): if self._last_aes256_key[:2] == (kdf_count, salt): return self._last_aes256_key[2] if kdf_count > 24: raise BadRarFile('Too large kdf_count') psw = self._password if isinstance(psw, unicode): psw = psw.encode('utf8') key = pbkdf2_sha256(psw, salt, 1 << kdf_count) self._last_aes256_key = (kdf_count, salt, key) return key def _decrypt_header(self, fd): if not _have_crypto: raise NoCrypto('Cannot parse encrypted headers - no crypto') h = self._hdrenc_main key = self._gen_key(h.encryption_kdf_count, h.encryption_salt) iv = fd.read(16) return HeaderDecrypt(fd, key, iv) # common header def _parse_block_header(self, fd): header_offset = fd.tell() preload = 4 + 3 start_bytes = fd.read(preload) header_crc, pos = load_le32(start_bytes, 0) hdrlen, pos = load_vint(start_bytes, pos) if hdrlen > 2 * 1024 * 1024: return None header_size = pos + hdrlen # read full header, check for EOF hdata = start_bytes + fd.read(header_size - len(start_bytes)) if len(hdata) != header_size: self._set_error('Unexpected EOF when reading header') return None data_offset = fd.tell() calc_crc = rar_crc32(memoryview(hdata)[4:]) if header_crc != calc_crc: # header parsing failed. self._set_error('Header CRC error: exp=%x got=%x (xlen = %d)', header_crc, calc_crc, len(hdata)) return None block_type, pos = load_vint(hdata, pos) if block_type == RAR5_BLOCK_MAIN: h, pos = self._parse_block_common(Rar5MainInfo(), hdata) h = self._parse_main_block(h, hdata, pos) elif block_type == RAR5_BLOCK_FILE: h, pos = self._parse_block_common(Rar5FileInfo(), hdata) h = self._parse_file_block(h, hdata, pos) elif block_type == RAR5_BLOCK_SERVICE: h, pos = self._parse_block_common(Rar5ServiceInfo(), hdata) h = self._parse_file_block(h, hdata, pos) elif block_type == RAR5_BLOCK_ENCRYPTION: h, pos = self._parse_block_common(Rar5EncryptionInfo(), hdata) h = self._parse_encryption_block(h, hdata, pos) elif block_type == RAR5_BLOCK_ENDARC: h, pos = self._parse_block_common(Rar5EndArcInfo(), hdata) h = self._parse_endarc_block(h, hdata, pos) else: h = None if h: h.header_offset = header_offset h.data_offset = data_offset return h def _parse_block_common(self, h, hdata): h.header_crc, pos = load_le32(hdata, 0) hdrlen, pos = load_vint(hdata, pos) h.header_size = hdrlen + pos h.block_type, pos = load_vint(hdata, pos) h.block_flags, pos = load_vint(hdata, pos) if h.block_flags & RAR5_BLOCK_FLAG_EXTRA_DATA: h.block_extra_size, pos = load_vint(hdata, pos) if h.block_flags & RAR5_BLOCK_FLAG_DATA_AREA: h.add_size, pos = load_vint(hdata, pos) h.compress_size = h.add_size if h.block_flags & RAR5_BLOCK_FLAG_SKIP_IF_UNKNOWN: h.flags |= RAR_SKIP_IF_UNKNOWN if h.block_flags & RAR5_BLOCK_FLAG_DATA_AREA: h.flags |= RAR_LONG_BLOCK return h, pos def _parse_main_block(self, h, hdata, pos): h.main_flags, pos = load_vint(hdata, pos) if h.main_flags & RAR5_MAIN_FLAG_HAS_VOLNR: h.main_volume_number, pos = load_vint(hdata, pos) h.flags |= RAR_MAIN_NEWNUMBERING if h.main_flags & RAR5_MAIN_FLAG_SOLID: h.flags |= RAR_MAIN_SOLID if h.main_flags & RAR5_MAIN_FLAG_ISVOL: h.flags |= RAR_MAIN_VOLUME if h.main_flags & RAR5_MAIN_FLAG_RECOVERY: h.flags |= RAR_MAIN_RECOVERY if self._hdrenc_main: h.flags |= RAR_MAIN_PASSWORD if h.main_flags & RAR5_MAIN_FLAG_HAS_VOLNR == 0: h.flags |= RAR_MAIN_FIRSTVOLUME return h def _parse_file_block(self, h, hdata, pos): h.file_flags, pos = load_vint(hdata, pos) h.file_size, pos = load_vint(hdata, pos) h.mode, pos = load_vint(hdata, pos) if h.file_flags & RAR5_FILE_FLAG_HAS_MTIME: h.mtime, pos = load_unixtime(hdata, pos) h.date_time = h.mtime.timetuple()[:6] if h.file_flags & RAR5_FILE_FLAG_HAS_CRC32: h.CRC, pos = load_le32(hdata, pos) h._md_class = CRC32Context h._md_expect = h.CRC h.file_compress_flags, pos = load_vint(hdata, pos) h.file_host_os, pos = load_vint(hdata, pos) h.orig_filename, pos = load_vstr(hdata, pos) h.filename = h.orig_filename.decode('utf8', 'replace') # use compatible values if h.file_host_os == RAR5_OS_WINDOWS: h.host_os = RAR_OS_WIN32 else: h.host_os = RAR_OS_UNIX h.compress_type = RAR_M0 + ((h.file_compress_flags >> 7) & 7) if h.block_extra_size: # allow 1 byte of garbage while pos < len(hdata) - 1: xsize, pos = load_vint(hdata, pos) xdata, pos = load_bytes(hdata, xsize, pos) self._process_file_extra(h, xdata) if h.block_flags & RAR5_BLOCK_FLAG_SPLIT_BEFORE: h.flags |= RAR_FILE_SPLIT_BEFORE if h.block_flags & RAR5_BLOCK_FLAG_SPLIT_AFTER: h.flags |= RAR_FILE_SPLIT_AFTER if h.file_flags & RAR5_FILE_FLAG_ISDIR: h.flags |= RAR_FILE_DIRECTORY if h.file_compress_flags & RAR5_COMPR_SOLID: h.flags |= RAR_FILE_SOLID return h def _parse_endarc_block(self, h, hdata, pos): h.endarc_flags, pos = load_vint(hdata, pos) if h.endarc_flags & RAR5_ENDARC_FLAG_NEXT_VOL: h.flags |= RAR_ENDARC_NEXT_VOLUME return h def _parse_encryption_block(self, h, hdata, pos): h.encryption_algo, pos = load_vint(hdata, pos) h.encryption_flags, pos = load_vint(hdata, pos) h.encryption_kdf_count, pos = load_byte(hdata, pos) h.encryption_salt, pos = load_bytes(hdata, 16, pos) if h.encryption_flags & RAR5_ENC_FLAG_HAS_CHECKVAL: h.encryption_check_value = load_bytes(hdata, 12, pos) if h.encryption_algo != RAR5_XENC_CIPHER_AES256: raise BadRarFile('Unsupported header encryption cipher') self._hdrenc_main = h return h # file extra record def _process_file_extra(self, h, xdata): xtype, pos = load_vint(xdata, 0) if xtype == RAR5_XFILE_TIME: self._parse_file_xtime(h, xdata, pos) elif xtype == RAR5_XFILE_ENCRYPTION: self._parse_file_encryption(h, xdata, pos) elif xtype == RAR5_XFILE_HASH: self._parse_file_hash(h, xdata, pos) elif xtype == RAR5_XFILE_VERSION: self._parse_file_version(h, xdata, pos) elif xtype == RAR5_XFILE_REDIR: self._parse_file_redir(h, xdata, pos) elif xtype == RAR5_XFILE_OWNER: self._parse_file_owner(h, xdata, pos) elif xtype == RAR5_XFILE_SERVICE: pass else: pass # extra block for file time record def _parse_file_xtime(self, h, xdata, pos): tflags, pos = load_vint(xdata, pos) ldr = load_windowstime if tflags & RAR5_XTIME_UNIXTIME: ldr = load_unixtime if tflags & RAR5_XTIME_HAS_MTIME: h.mtime, pos = ldr(xdata, pos) h.date_time = h.mtime.timetuple()[:6] if tflags & RAR5_XTIME_HAS_CTIME: h.ctime, pos = ldr(xdata, pos) if tflags & RAR5_XTIME_HAS_ATIME: h.atime, pos = ldr(xdata, pos) # just remember encryption info def _parse_file_encryption(self, h, xdata, pos): algo, pos = load_vint(xdata, pos) flags, pos = load_vint(xdata, pos) kdf_count, pos = load_byte(xdata, pos) salt, pos = load_bytes(xdata, 16, pos) iv, pos = load_bytes(xdata, 16, pos) checkval = None if flags & RAR5_XENC_CHECKVAL: checkval, pos = load_bytes(xdata, 12, pos) if flags & RAR5_XENC_TWEAKED: h._md_expect = None h._md_class = NoHashContext h.file_encryption = (algo, flags, kdf_count, salt, iv, checkval) h.flags |= RAR_FILE_PASSWORD def _parse_file_hash(self, h, xdata, pos): hash_type, pos = load_vint(xdata, pos) if hash_type == RAR5_XHASH_BLAKE2SP: h.blake2sp_hash, pos = load_bytes(xdata, 32, pos) if _have_blake2 and (h.file_encryption[1] & RAR5_XENC_TWEAKED) == 0: h._md_class = Blake2SP h._md_expect = h.blake2sp_hash def _parse_file_version(self, h, xdata, pos): flags, pos = load_vint(xdata, pos) version, pos = load_vint(xdata, pos) h.file_version = (flags, version) def _parse_file_redir(self, h, xdata, pos): redir_type, pos = load_vint(xdata, pos) redir_flags, pos = load_vint(xdata, pos) redir_name, pos = load_vstr(xdata, pos) redir_name = redir_name.decode('utf8', 'replace') h.file_redir = (redir_type, redir_flags, redir_name) def _parse_file_owner(self, h, xdata, pos): user_name = group_name = user_id = group_id = None flags, pos = load_vint(xdata, pos) if flags & RAR5_XOWNER_UNAME: user_name, pos = load_vstr(xdata, pos) if flags & RAR5_XOWNER_GNAME: group_name, pos = load_vstr(xdata, pos) if flags & RAR5_XOWNER_UID: user_id, pos = load_vint(xdata, pos) if flags & RAR5_XOWNER_GID: group_id, pos = load_vint(xdata, pos) h.file_owner = (user_name, group_name, user_id, group_id) def process_entry(self, fd, item): if item.block_type == RAR5_BLOCK_FILE: # use only first part if (item.block_flags & RAR5_BLOCK_FLAG_SPLIT_BEFORE) == 0: self._info_map[item.filename] = item self._info_list.append(item) elif len(self._info_list) > 0: # final crc is in last block old = self._info_list[-1] old.CRC = item.CRC old._md_expect = item._md_expect old.blake2sp_hash = item.blake2sp_hash old.compress_size += item.compress_size elif item.block_type == RAR5_BLOCK_SERVICE: if item.filename == 'CMT': self._load_comment(fd, item) def _load_comment(self, fd, item): if item.block_flags & (RAR5_BLOCK_FLAG_SPLIT_BEFORE | RAR5_BLOCK_FLAG_SPLIT_AFTER): return None if item.compress_type != RAR_M0: return None if item.flags & RAR_FILE_PASSWORD: algo, ___flags, kdf_count, salt, iv, ___checkval = item.file_encryption if algo != RAR5_XENC_CIPHER_AES256: return None key = self._gen_key(kdf_count, salt) f = HeaderDecrypt(fd, key, iv) cmt = f.read(item.file_size) else: # archive comment with self._open_clear(item) as cmtstream: cmt = cmtstream.read() # rar bug? - appends zero to comment cmt = cmt.split(ZERO, 1)[0] self.comment = cmt.decode('utf8') return None def _open_hack(self, inf, psw): # len, type, blk_flags, flags main_hdr = b'\x03\x01\x00\x00' endarc_hdr = b'\x03\x05\x00\x00' main_hdr = S_LONG.pack(rar_crc32(main_hdr)) + main_hdr endarc_hdr = S_LONG.pack(rar_crc32(endarc_hdr)) + endarc_hdr return self._open_hack_core(inf, psw, RAR5_ID + main_hdr, endarc_hdr) ## ## Utility classes ## class UnicodeFilename(object): """Handle RAR3 unicode filename decompression. """ def __init__(self, name, encdata): self.std_name = bytearray(name) self.encdata = bytearray(encdata) self.pos = self.encpos = 0 self.buf = bytearray() self.failed = 0 def enc_byte(self): """Copy encoded byte.""" try: c = self.encdata[self.encpos] self.encpos += 1 return c except IndexError: self.failed = 1 return 0 def std_byte(self): """Copy byte from 8-bit representation.""" try: return self.std_name[self.pos] except IndexError: self.failed = 1 return ord('?') def put(self, lo, hi): """Copy 16-bit value to result.""" self.buf.append(lo) self.buf.append(hi) self.pos += 1 def decode(self): """Decompress compressed UTF16 value.""" hi = self.enc_byte() flagbits = 0 while self.encpos < len(self.encdata): if flagbits == 0: flags = self.enc_byte() flagbits = 8 flagbits -= 2 t = (flags >> flagbits) & 3 if t == 0: self.put(self.enc_byte(), 0) elif t == 1: self.put(self.enc_byte(), hi) elif t == 2: self.put(self.enc_byte(), self.enc_byte()) else: n = self.enc_byte() if n & 0x80: c = self.enc_byte() for _ in range((n & 0x7f) + 2): lo = (self.std_byte() + c) & 0xFF self.put(lo, hi) else: for _ in range(n + 2): self.put(self.std_byte(), 0) return self.buf.decode("utf-16le", "replace") class RarExtFile(RawIOBase): """Base class for file-like object that :meth:`RarFile.open` returns. Provides public methods and common crc checking. Behaviour: - no short reads - .read() and .readinfo() read as much as requested. - no internal buffer, use io.BufferedReader for that. """ #: Filename of the archive entry name = None def __init__(self, parser, inf): """Open archive entry. """ super(RarExtFile, self).__init__() # standard io.* properties self.name = inf.filename self.mode = 'rb' self._parser = parser self._inf = inf self._fd = None self._remain = 0 self._returncode = 0 self._md_context = None self._open() def _open(self): if self._fd: self._fd.close() md_class = self._inf._md_class or NoHashContext self._md_context = md_class() self._fd = None self._remain = self._inf.file_size def read(self, cnt=None): """Read all or specified amount of data from archive entry.""" # sanitize cnt if cnt is None or cnt < 0: cnt = self._remain elif cnt > self._remain: cnt = self._remain if cnt == 0: return EMPTY # actual read data = self._read(cnt) if data: self._md_context.update(data) self._remain -= len(data) if len(data) != cnt: raise BadRarFile("Failed the read enough data") # done? if not data or self._remain == 0: # self.close() self._check() return data def _check(self): """Check final CRC.""" final = self._md_context.digest() exp = self._inf._md_expect if exp is None: return if final is None: return if self._returncode: check_returncode(self, '') if self._remain != 0: raise BadRarFile("Failed the read enough data") if final != exp: raise BadRarFile("Corrupt file - CRC check failed: %s - exp=%r got=%r" % ( self._inf.filename, exp, final)) def _read(self, cnt): """Actual read that gets sanitized cnt.""" raise NotImplementedError("_read") def close(self): """Close open resources.""" super(RarExtFile, self).close() if self._fd: self._fd.close() self._fd = None def __del__(self): """Hook delete to make sure tempfile is removed.""" self.close() def readinto(self, buf): """Zero-copy read directly into buffer. Returns bytes read. """ raise NotImplementedError('readinto') def tell(self): """Return current reading position in uncompressed data.""" return self._inf.file_size - self._remain def seek(self, ofs, whence=0): """Seek in data. On uncompressed files, the seeking works by actual seeks so it's fast. On compresses files its slow - forward seeking happends by reading ahead, backwards by re-opening and decompressing from the start. """ # disable crc check when seeking self._md_context = NoHashContext() fsize = self._inf.file_size cur_ofs = self.tell() if whence == 0: # seek from beginning of file new_ofs = ofs elif whence == 1: # seek from current position new_ofs = cur_ofs + ofs elif whence == 2: # seek from end of file new_ofs = fsize + ofs else: raise ValueError('Invalid value for whence') # sanity check if new_ofs < 0: new_ofs = 0 elif new_ofs > fsize: new_ofs = fsize # do the actual seek if new_ofs >= cur_ofs: self._skip(new_ofs - cur_ofs) else: # reopen and seek self._open() self._skip(new_ofs) return self.tell() def _skip(self, cnt): """Read and discard data""" while cnt > 0: if cnt > 8192: buf = self.read(8192) else: buf = self.read(cnt) if not buf: break cnt -= len(buf) def readable(self): """Returns True""" return True def writable(self): """Returns False. Writing is not supported. """ return False def seekable(self): """Returns True. Seeking is supported, although it's slow on compressed files. """ return True def readall(self): """Read all remaining data""" # avoid RawIOBase default impl return self.read() class PipeReader(RarExtFile): """Read data from pipe, handle tempfile cleanup.""" def __init__(self, rf, inf, cmd, tempfile=None): self._cmd = cmd self._proc = None self._tempfile = tempfile super(PipeReader, self).__init__(rf, inf) def _close_proc(self): if not self._proc: return if self._proc.stdout: self._proc.stdout.close() if self._proc.stdin: self._proc.stdin.close() if self._proc.stderr: self._proc.stderr.close() self._proc.wait() self._returncode = self._proc.returncode self._proc = None def _open(self): super(PipeReader, self)._open() # stop old process self._close_proc() # launch new process self._returncode = 0 self._proc = custom_popen(self._cmd) self._fd = self._proc.stdout # avoid situation where unrar waits on stdin if self._proc.stdin: self._proc.stdin.close() def _read(self, cnt): """Read from pipe.""" # normal read is usually enough data = self._fd.read(cnt) if len(data) == cnt or not data: return data # short read, try looping buf = [data] cnt -= len(data) while cnt > 0: data = self._fd.read(cnt) if not data: break cnt -= len(data) buf.append(data) return EMPTY.join(buf) def close(self): """Close open resources.""" self._close_proc() super(PipeReader, self).close() if self._tempfile: try: os.unlink(self._tempfile) except OSError: pass self._tempfile = None def readinto(self, buf): """Zero-copy read directly into buffer.""" cnt = len(buf) if cnt > self._remain: cnt = self._remain vbuf = memoryview(buf) res = got = 0 while got < cnt: res = self._fd.readinto(vbuf[got : cnt]) if not res: break self._md_context.update(vbuf[got : got + res]) self._remain -= res got += res return got class DirectReader(RarExtFile): """Read uncompressed data directly from archive. """ _cur = None _cur_avail = None _volfile = None def _open(self): super(DirectReader, self)._open() self._volfile = self._inf.volume_file self._fd = XFile(self._volfile, 0) self._fd.seek(self._inf.header_offset, 0) self._cur = self._parser._parse_header(self._fd) self._cur_avail = self._cur.add_size def _skip(self, cnt): """RAR Seek, skipping through rar files to get to correct position """ while cnt > 0: # next vol needed? if self._cur_avail == 0: if not self._open_next(): break # fd is in read pos, do the read if cnt > self._cur_avail: cnt -= self._cur_avail self._remain -= self._cur_avail self._cur_avail = 0 else: self._fd.seek(cnt, 1) self._cur_avail -= cnt self._remain -= cnt cnt = 0 def _read(self, cnt): """Read from potentially multi-volume archive.""" buf = [] while cnt > 0: # next vol needed? if self._cur_avail == 0: if not self._open_next(): break # fd is in read pos, do the read if cnt > self._cur_avail: data = self._fd.read(self._cur_avail) else: data = self._fd.read(cnt) if not data: break # got some data cnt -= len(data) self._cur_avail -= len(data) buf.append(data) if len(buf) == 1: return buf[0] return EMPTY.join(buf) def _open_next(self): """Proceed to next volume.""" # is the file split over archives? if (self._cur.flags & RAR_FILE_SPLIT_AFTER) == 0: return False if self._fd: self._fd.close() self._fd = None # open next part self._volfile = self._parser._next_volname(self._volfile) fd = open(self._volfile, "rb", 0) self._fd = fd sig = fd.read(len(self._parser._expect_sig)) if sig != self._parser._expect_sig: raise BadRarFile("Invalid signature") # loop until first file header while 1: cur = self._parser._parse_header(fd) if not cur: raise BadRarFile("Unexpected EOF") if cur.type in (RAR_BLOCK_MARK, RAR_BLOCK_MAIN): if cur.add_size: fd.seek(cur.add_size, 1) continue if cur.orig_filename != self._inf.orig_filename: raise BadRarFile("Did not found file entry") self._cur = cur self._cur_avail = cur.add_size return True def readinto(self, buf): """Zero-copy read directly into buffer.""" got = 0 vbuf = memoryview(buf) while got < len(buf): # next vol needed? if self._cur_avail == 0: if not self._open_next(): break # length for next read cnt = len(buf) - got if cnt > self._cur_avail: cnt = self._cur_avail # read into temp view res = self._fd.readinto(vbuf[got : got + cnt]) if not res: break self._md_context.update(vbuf[got : got + res]) self._cur_avail -= res self._remain -= res got += res return got class HeaderDecrypt(object): """File-like object that decrypts from another file""" def __init__(self, f, key, iv): self.f = f self.ciph = AES_CBC_Decrypt(key, iv) self.buf = EMPTY def tell(self): """Current file pos - works only on block boundaries.""" return self.f.tell() def read(self, cnt=None): """Read and decrypt.""" if cnt > 8 * 1024: raise BadRarFile('Bad count to header decrypt - wrong password?') # consume old data if cnt <= len(self.buf): res = self.buf[:cnt] self.buf = self.buf[cnt:] return res res = self.buf self.buf = EMPTY cnt -= len(res) # decrypt new data blklen = 16 while cnt > 0: enc = self.f.read(blklen) if len(enc) < blklen: break dec = self.ciph.decrypt(enc) if cnt >= len(dec): res += dec cnt -= len(dec) else: res += dec[:cnt] self.buf = dec[cnt:] cnt = 0 return res # handle (filename|filelike) object class XFile(object): """Input may be filename or file object. """ __slots__ = ('_fd', '_need_close') def __init__(self, xfile, bufsize=1024): if is_filelike(xfile): self._need_close = False self._fd = xfile self._fd.seek(0) else: self._need_close = True self._fd = open(xfile, 'rb', bufsize) def read(self, n=None): """Read from file.""" return self._fd.read(n) def tell(self): """Return file pos.""" return self._fd.tell() def seek(self, ofs, whence=0): """Move file pos.""" return self._fd.seek(ofs, whence) def readinto(self, dst): """Read into buffer.""" return self._fd.readinto(dst) def close(self): """Close file object.""" if self._need_close: self._fd.close() def __enter__(self): return self def __exit__(self, typ, val, tb): self.close() class NoHashContext(object): """No-op hash function.""" def __init__(self, data=None): """Initialize""" def update(self, data): """Update data""" def digest(self): """Final hash""" def hexdigest(self): """Hexadecimal digest.""" class CRC32Context(object): """Hash context that uses CRC32.""" __slots__ = ['_crc'] def __init__(self, data=None): self._crc = 0 if data: self.update(data) def update(self, data): """Process data.""" self._crc = rar_crc32(data, self._crc) def digest(self): """Final hash.""" return self._crc def hexdigest(self): """Hexadecimal digest.""" return '%08x' % self.digest() class Blake2SP(object): """Blake2sp hash context. """ __slots__ = ['_thread', '_buf', '_cur', '_digest'] digest_size = 32 block_size = 64 parallelism = 8 def __init__(self, data=None): self._buf = b'' self._cur = 0 self._digest = None self._thread = [] for i in range(self.parallelism): ctx = self._blake2s(i, 0, i == (self.parallelism - 1)) self._thread.append(ctx) if data: self.update(data) def _blake2s(self, ofs, depth, is_last): return blake2s(node_offset=ofs, node_depth=depth, last_node=is_last, depth=2, inner_size=32, fanout=self.parallelism) def _add_block(self, blk): self._thread[self._cur].update(blk) self._cur = (self._cur + 1) % self.parallelism def update(self, data): """Hash data. """ view = memoryview(data) bs = self.block_size if self._buf: need = bs - len(self._buf) if len(view) < need: self._buf += view.tobytes() return self._add_block(self._buf + view[:need].tobytes()) view = view[need:] while len(view) >= bs: self._add_block(view[:bs]) view = view[bs:] self._buf = view.tobytes() def digest(self): """Return final digest value. """ if self._digest is None: if self._buf: self._add_block(self._buf) self._buf = EMPTY ctx = self._blake2s(0, 1, True) for t in self._thread: ctx.update(t.digest()) self._digest = ctx.digest() return self._digest def hexdigest(self): """Hexadecimal digest.""" return tohex(self.digest()) class Rar3Sha1(object): """Bug-compat for SHA1 """ digest_size = 20 block_size = 64 _BLK_BE = struct.Struct(b'>16L') _BLK_LE = struct.Struct(b'<16L') __slots__ = ('_nbytes', '_md', '_rarbug') def __init__(self, data=b'', rarbug=False): self._md = sha1() self._nbytes = 0 self._rarbug = rarbug self.update(data) def update(self, data): """Process more data.""" self._md.update(data) bufpos = self._nbytes & 63 self._nbytes += len(data) if self._rarbug and len(data) > 64: dpos = self.block_size - bufpos while dpos + self.block_size <= len(data): self._corrupt(data, dpos) dpos += self.block_size def digest(self): """Return final state.""" return self._md.digest() def hexdigest(self): """Return final state as hex string.""" return self._md.hexdigest() def _corrupt(self, data, dpos): """Corruption from SHA1 core.""" ws = list(self._BLK_BE.unpack_from(data, dpos)) for t in range(16, 80): tmp = ws[(t - 3) & 15] ^ ws[(t - 8) & 15] ^ ws[(t - 14) & 15] ^ ws[(t - 16) & 15] ws[t & 15] = ((tmp << 1) | (tmp >> (32 - 1))) & 0xFFFFFFFF self._BLK_LE.pack_into(data, dpos, *ws) ## ## Utility functions ## S_LONG = Struct(' len(buf): raise BadRarFile('cannot load byte') return S_BYTE.unpack_from(buf, pos)[0], end def load_le32(buf, pos): """Load little-endian 32-bit integer""" end = pos + 4 if end > len(buf): raise BadRarFile('cannot load le32') return S_LONG.unpack_from(buf, pos)[0], pos + 4 def load_bytes(buf, num, pos): """Load sequence of bytes""" end = pos + num if end > len(buf): raise BadRarFile('cannot load bytes') return buf[pos : end], end def load_vstr(buf, pos): """Load bytes prefixed by vint length""" slen, pos = load_vint(buf, pos) return load_bytes(buf, slen, pos) def load_dostime(buf, pos): """Load LE32 dos timestamp""" stamp, pos = load_le32(buf, pos) tup = parse_dos_time(stamp) return to_datetime(tup), pos def load_unixtime(buf, pos): """Load LE32 unix timestamp""" secs, pos = load_le32(buf, pos) dt = datetime.fromtimestamp(secs, UTC) return dt, pos def load_windowstime(buf, pos): """Load LE64 windows timestamp""" # unix epoch (1970) in seconds from windows epoch (1601) unix_epoch = 11644473600 val1, pos = load_le32(buf, pos) val2, pos = load_le32(buf, pos) secs, n1secs = divmod((val2 << 32) | val1, 10000000) dt = datetime.fromtimestamp(secs - unix_epoch, UTC) dt = dt.replace(microsecond=n1secs // 10) return dt, pos # new-style next volume def _next_newvol(volfile): i = len(volfile) - 1 while i >= 0: if volfile[i] >= '0' and volfile[i] <= '9': return _inc_volname(volfile, i) i -= 1 raise BadRarName("Cannot construct volume name: " + volfile) # old-style next volume def _next_oldvol(volfile): # rar -> r00 if volfile[-4:].lower() == '.rar': return volfile[:-2] + '00' return _inc_volname(volfile, len(volfile) - 1) # increase digits with carry, otherwise just increment char def _inc_volname(volfile, i): fn = list(volfile) while i >= 0: if fn[i] != '9': fn[i] = chr(ord(fn[i]) + 1) break fn[i] = '0' i -= 1 return ''.join(fn) # rar3 extended time fields def _parse_ext_time(h, data, pos): # flags and rest of data can be missing flags = 0 if pos + 2 <= len(data): flags = S_SHORT.unpack_from(data, pos)[0] pos += 2 mtime, pos = _parse_xtime(flags >> 3 * 4, data, pos, h.mtime) h.ctime, pos = _parse_xtime(flags >> 2 * 4, data, pos) h.atime, pos = _parse_xtime(flags >> 1 * 4, data, pos) h.arctime, pos = _parse_xtime(flags >> 0 * 4, data, pos) if mtime: h.mtime = mtime h.date_time = mtime.timetuple()[:6] return pos # rar3 one extended time field def _parse_xtime(flag, data, pos, basetime=None): res = None if flag & 8: if not basetime: basetime, pos = load_dostime(data, pos) # load second fractions rem = 0 cnt = flag & 3 for _ in range(cnt): b, pos = load_byte(data, pos) rem = (b << 16) | (rem >> 8) # convert 100ns units to microseconds usec = rem // 10 if usec > 1000000: usec = 999999 # dostime has room for 30 seconds only, correct if needed if flag & 4 and basetime.second < 59: res = basetime.replace(microsecond=usec, second=basetime.second + 1) else: res = basetime.replace(microsecond=usec) return res, pos def is_filelike(obj): """Filename or file object? """ if _have_pathlib: filename_types = (bytes, unicode, Path) else: filename_types = (bytes, unicode) if isinstance(obj, filename_types): return False res = True for a in ('read', 'tell', 'seek'): res = res and hasattr(obj, a) if not res: raise ValueError("Invalid object passed as file") return True def rar3_s2k(psw, salt): """String-to-key hash for RAR3. """ if not isinstance(psw, unicode): psw = psw.decode('utf8') seed = bytearray(psw.encode('utf-16le') + salt) h = Rar3Sha1(rarbug=True) iv = EMPTY for i in range(16): for j in range(0x4000): cnt = S_LONG.pack(i * 0x4000 + j) h.update(seed) h.update(cnt[:3]) if j == 0: iv += h.digest()[19:20] key_be = h.digest()[:16] key_le = pack("LLLL", key_be)) return key_le, iv def rar3_decompress(vers, meth, data, declen=0, flags=0, crc=0, psw=None, salt=None): """Decompress blob of compressed data. Used for data with non-standard header - eg. comments. """ # already uncompressed? if meth == RAR_M0 and (flags & RAR_FILE_PASSWORD) == 0: return data # take only necessary flags flags = flags & (RAR_FILE_PASSWORD | RAR_FILE_SALT | RAR_FILE_DICTMASK) flags |= RAR_LONG_BLOCK # file header fname = b'data' date = 0 mode = 0x20 fhdr = S_FILE_HDR.pack(len(data), declen, RAR_OS_MSDOS, crc, date, vers, meth, len(fname), mode) fhdr += fname if flags & RAR_FILE_SALT: if not salt: return EMPTY fhdr += salt # full header hlen = S_BLK_HDR.size + len(fhdr) hdr = S_BLK_HDR.pack(0, RAR_BLOCK_FILE, flags, hlen) + fhdr hcrc = rar_crc32(hdr[2:]) & 0xFFFF hdr = S_BLK_HDR.pack(hcrc, RAR_BLOCK_FILE, flags, hlen) + fhdr # archive main header mh = S_BLK_HDR.pack(0x90CF, RAR_BLOCK_MAIN, 0, 13) + ZERO * (2 + 4) # decompress via temp rar tmpfd, tmpname = mkstemp(suffix='.rar') tmpf = os.fdopen(tmpfd, "wb") try: tmpf.write(RAR_ID + mh + hdr + data) tmpf.close() cmd = [UNRAR_TOOL] + list(OPEN_ARGS) add_password_arg(cmd, psw, (flags & RAR_FILE_PASSWORD)) cmd.append(tmpname) p = custom_popen(cmd) return p.communicate()[0] finally: tmpf.close() os.unlink(tmpname) def to_datetime(t): """Convert 6-part time tuple into datetime object. """ if t is None: return None # extract values year, mon, day, h, m, s = t # assume the values are valid try: return datetime(year, mon, day, h, m, s) except ValueError: pass # sanitize invalid values mday = (0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) if mon < 1: mon = 1 if mon > 12: mon = 12 if day < 1: day = 1 if day > mday[mon]: day = mday[mon] if h > 23: h = 23 if m > 59: m = 59 if s > 59: s = 59 if mon == 2 and day == 29: try: return datetime(year, mon, day, h, m, s) except ValueError: day = 28 return datetime(year, mon, day, h, m, s) def parse_dos_time(stamp): """Parse standard 32-bit DOS timestamp. """ sec, stamp = stamp & 0x1F, stamp >> 5 mn, stamp = stamp & 0x3F, stamp >> 6 hr, stamp = stamp & 0x1F, stamp >> 5 day, stamp = stamp & 0x1F, stamp >> 5 mon, stamp = stamp & 0x0F, stamp >> 4 yr = (stamp & 0x7F) + 1980 return (yr, mon, day, hr, mn, sec * 2) def custom_popen(cmd): """Disconnect cmd from parent fds, read only from stdout. """ # needed for py2exe creationflags = 0 if sys.platform == 'win32': creationflags = 0x08000000 # CREATE_NO_WINDOW # run command try: p = Popen(cmd, bufsize=0, stdout=PIPE, stdin=PIPE, stderr=STDOUT, creationflags=creationflags) except OSError as ex: if ex.errno == errno.ENOENT: raise RarCannotExec("Unrar not installed? (rarfile.UNRAR_TOOL=%r)" % UNRAR_TOOL) if ex.errno == errno.EACCES or ex.errno == errno.EPERM: raise RarCannotExec("Cannot execute unrar (rarfile.UNRAR_TOOL=%r)" % UNRAR_TOOL) raise return p def custom_check(cmd, ignore_retcode=False): """Run command, collect output, raise error if needed. """ p = custom_popen(cmd) out, _ = p.communicate() if p.returncode and not ignore_retcode: raise RarExecError("Check-run failed") return out def add_password_arg(cmd, psw, ___required=False): """Append password switch to commandline. """ if UNRAR_TOOL == ALT_TOOL: return if psw is not None: cmd.append('-p' + psw) else: cmd.append('-p-') def check_returncode(p, out): """Raise exception according to unrar exit code. """ code = p.returncode if code == 0: return # map return code to exception class, codes from rar.txt errmap = [None, RarWarning, RarFatalError, RarCRCError, RarLockedArchiveError, # 1..4 RarWriteError, RarOpenError, RarUserError, RarMemoryError, # 5..8 RarCreateError, RarNoFilesError, RarWrongPassword] # 9..11 if UNRAR_TOOL == ALT_TOOL: errmap = [None] if code > 0 and code < len(errmap): exc = errmap[code] elif code == 255: exc = RarUserBreak elif code < 0: exc = RarSignalExit else: exc = RarUnknownError # format message if out: msg = "%s [%d]: %s" % (exc.__doc__, p.returncode, out) else: msg = "%s [%d]" % (exc.__doc__, p.returncode) raise exc(msg) def hmac_sha256(key, data): """HMAC-SHA256""" return HMAC(key, data, sha256).digest() def membuf_tempfile(memfile): """Write in-memory file object to real file.""" memfile.seek(0, 0) tmpfd, tmpname = mkstemp(suffix='.rar') tmpf = os.fdopen(tmpfd, "wb") try: while True: buf = memfile.read(BSIZE) if not buf: break tmpf.write(buf) tmpf.close() except: tmpf.close() os.unlink(tmpname) raise return tmpname class XTempFile(object): """Real file for archive. """ __slots__ = ('_tmpfile', '_filename') def __init__(self, rarfile): if is_filelike(rarfile): self._tmpfile = membuf_tempfile(rarfile) self._filename = self._tmpfile else: self._tmpfile = None self._filename = rarfile def __enter__(self): return self._filename def __exit__(self, exc_type, exc_value, tb): if self._tmpfile: try: os.unlink(self._tmpfile) except OSError: pass self._tmpfile = None # # Check if unrar works # ORIG_UNRAR_TOOL = UNRAR_TOOL ORIG_OPEN_ARGS = OPEN_ARGS ORIG_EXTRACT_ARGS = EXTRACT_ARGS ORIG_TEST_ARGS = TEST_ARGS def _check_unrar_tool(): global UNRAR_TOOL, OPEN_ARGS, EXTRACT_ARGS, TEST_ARGS try: # does UNRAR_TOOL work? custom_check([ORIG_UNRAR_TOOL], True) UNRAR_TOOL = ORIG_UNRAR_TOOL OPEN_ARGS = ORIG_OPEN_ARGS EXTRACT_ARGS = ORIG_EXTRACT_ARGS TEST_ARGS = ORIG_TEST_ARGS except RarCannotExec: try: # does ALT_TOOL work? custom_check([ALT_TOOL] + list(ALT_CHECK_ARGS), True) # replace config UNRAR_TOOL = ALT_TOOL OPEN_ARGS = ALT_OPEN_ARGS EXTRACT_ARGS = ALT_EXTRACT_ARGS TEST_ARGS = ALT_TEST_ARGS except RarCannotExec: # no usable tool, only uncompressed archives work return False return True _check_unrar_tool() rarfile-3.1/MANIFEST.in0000644000175000017500000000031613447402474012652 0ustar hlehleinclude README.rst Makefile MANIFEST.in LICENSE dumprar.py include doc/*.rst doc/Makefile doc/conf.py doc/make.bat include test/Makefile test/*.sh test/files/*.rar test/files/*.r[0-9][0-9] test/files/*.exp rarfile-3.1/setup.py0000644000175000017500000000204113447402474012623 0ustar hlehle"""Setup script for rarfile. """ from setuptools import setup import re vrx = r"""^__version__ *= *['"]([^'"]+)['"]""" src = open("rarfile.py").read() ver = re.search(vrx, src, re.M).group(1) ldesc = open("README.rst").read().strip() sdesc = ldesc.split('\n')[0].split(' - ')[1].strip() setup( name = "rarfile", version = ver, description = sdesc, long_description = ldesc, author = "Marko Kreen", license = "ISC", author_email = "markokr@gmail.com", url = "https://github.com/markokr/rarfile", py_modules = ['rarfile'], keywords = ['rar', 'unrar', 'archive'], classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: ISC License (ISCL)", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Archiving :: Compression", ] ) rarfile-3.1/PKG-INFO0000644000175000017500000000402113537441230012177 0ustar hlehleMetadata-Version: 1.1 Name: rarfile Version: 3.1 Summary: RAR archive reader for Python Home-page: https://github.com/markokr/rarfile Author: Marko Kreen Author-email: markokr@gmail.com License: ISC Description: rarfile - RAR archive reader for Python ======================================= This is Python module for RAR_ archive reading. The interface is made as zipfile_ like as possible. Licensed under ISC_ license. Features: - Supports both RAR3 and RAR5 format archives. - Supports multi volume archives. - Supports Unicode filenames. - Supports password-protected archives. - Supports archive and file comments. - Archive parsing and non-compressed files are handled in pure Python code. - Compressed files are extracted by executing external tool: either ``unrar`` from RARLAB_ or ``bsdtar`` from libarchive_. - Works with both Python 2.7 and 3.x. Links: - `Documentation`_ - `Downloads`_ - `Git`_ repo .. _Git: https://github.com/markokr/rarfile .. _Downloads: https://pypi.python.org/pypi/rarfile .. _Documentation: https://rarfile.readthedocs.io/ .. _RAR: https://en.wikipedia.org/wiki/RAR_%28file_format%29 .. _zipfile: https://docs.python.org/2/library/zipfile.html .. _ISC: https://en.wikipedia.org/wiki/ISC_license .. _libarchive: https://github.com/libarchive/libarchive .. _RARLAB: http://www.rarlab.com/ Keywords: rar,unrar,archive Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: ISC License (ISCL) Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 3 Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: System :: Archiving :: Compression rarfile-3.1/setup.cfg0000644000175000017500000000004613537441230012726 0ustar hlehle[egg_info] tag_build = tag_date = 0 rarfile-3.1/Makefile0000644000175000017500000000134313537430666012561 0ustar hlehle VER := $(shell python3 setup.py --version) TGZ = dist/rarfile-$(VER).tar.gz prefix = /usr/local all: pyflakes3 rarfile.py tox -e lint tox -e py36-cryptography tox -e py37 install: python setup.py install --prefix=$(prefix) tgz: clean $(TGZ) clean: rm -rf __pycache__ build dist rm -f *.pyc MANIFEST *.orig *.rej *.html *.class rm -rf doc/_build doc/_static doc/_templates doc/html rm -rf .coverage cover* rm -rf *.egg-info rm -f test/files/*.rar.[pjt]* *.diffs toxclean: clean rm -rf .tox rbuild: curl -X POST https://readthedocs.org/build/6715 $(TGZ): python3 setup.py sdist upload: $(TGZ) twine upload $(TGZ) ack: for fn in test/files/*.py27; do \ cp $$fn `echo $$fn | sed 's/py27/exp/'` || exit 1; \ done