![]() EXTRACTCODE_7Z_PATH: the absolute path to a 7zip executableĪ system-installed libarchive and 7zip executable available in the system PATH.EXTRACTCODE_LIBARCHIVE_PATH: the absolute path to a libarchive DLL.Use environment variables to point to installed binaries: '': the absolute path to a 7zip executable.Method that must return a mapping with this key: Should point to a LocationProviderPlugin subclass with a get_locations() '': the absolute path to a libarchive shared object/DLLĪnd in the same way, the scancode_location_provider for extractcode_7zip.Subclass with a get_locations() method that must return a mapping with It does so by providing plugin entry points as scancode_location_providerįor extractcode_libarchive that should point to a LocationProviderPlugin ![]() These can either bundle a libarchive library, a 7z executable or expose a In this case, you will need to provide a working and compatible libarchive andħzip installed and configured in one of these ways such that ExtractCode canĪ typecode-libarchive and typecode-7z plugin: See the standard ones at System, use the minimal option: pip install extractcode If you want to use the version of binaries (possibly) provided by your operating To install this package with its full capability (where the binaries forħzip and libarchive are installed), use the full extra option: pip install extractcode It can handle multi-level archives such as tar.gz and can extract recursively Libmagic) to select the most appropriate extractor or decompressor function. The extraction is driven from a "voting" system that considers the fileĮxtension(s) and name, the filetype and mimetype (using a ctypes binding to Invalid, non-extractible names on certain filesystems or when there are multipleĬopies of the same path in a given archive (which is possible in a tar). Same way on all supported OSes, including auto-renaming files that would have ExtractCode tries to extract things in the With these, it is possible to extract a large number of common and less commonĪrchives and compressed file types. Renamed, special files and symlinks are skipped, permissions and owners areĬhanged but this it is fine for primary the use case which is analysis of fileĬontent for software composition or forensic analysis.īehind the scene, ExtractCode uses multiple tools such as: ![]() It can also extract recursively any type of (nested) archives-in-archives.Īs a downside, the extracted content may not be exactly what would be extractedįor a typical usage of the contained files: for instance some file may be Obtain the actual archived content when other tools may fail. In all these cases, ExtractCode will extract and try hard do the right thing to Typically need to be mounted to be accessed, and may require root accessĪnd guesswork to find out which partition and filesystem are at play and Or an archive may be a virtual disk or some file system(s) images that would.Or the archive may contain special file types (character/device files) that.Or the archive may contain weird paths including relative paths that may be.Or the extracted files are such permissions that you cannot read them and are.Or an archive may be damaged a little but most files can still be extracted.Overwritten by the same path showing up later in the archive giving the These cases the paths showing up earlier in the archive may be "hidden" and Or a tarball (on any OS) may contain multiple times the exact same path.Not extract OK on Windows: some file may be munged or the extract may file. ![]() It contains paths that are the same when ignoring the case and therefore will
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |