polyfile
polyfile copied to clipboard
A pure Python cleanroom implementation of libmagic, with instrumented parsing from Kaitai struct and an interactive hex viewer
Bumps [actions/add-to-project](https://github.com/actions/add-to-project) from 0.5.0 to 0.6.0. Commits 0609a27 Merge pull request #517 from mattcosta7/patch-1 9431bea Update action.yml 0008229 Merge pull request #503 from takost/update-to-node-20 5a5c08a Update action to node20 0be3b65...
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5. Release notes Sourced from actions/setup-python's releases. v5.0.0 What's Changed In scope of this release, we update node version runtime from node16 to node20 (actions/setup-python#772)....
On Windows with python 3.11 and polyfile 0.5.2, processing the following files as [demonstrated in the README](https://github.com/trailofbits/polyfile#libmagic-implementation) seems to take forever: - https://github.com/ahupp/python-magic/files/9231524/memblock.txt (1,399 bytes) - https://github.com/ggerganov/whisper.cpp/blob/master/bindings/java/src/test/java/io/github/ggerganov/whispercpp/WhisperCppTest.java (4,178 bytes) python-magic...
Hi, it looks like issue #30 was closed but the pull request associated with it was never merged into master. Was this intentional?
Any thoughts on doing _something_ (see below) to add a way to skip the base64 output of the scanned file in JSON format? I recognize that having it in there...
Since commit a98992c5818129949b11912cbf11b5b4972430c0 polyfile uses a narrower version specifier for the version of `chardet` expected. In the meantime chardet 5.1.0 has been released (and packaged on Arch Linux), which leads...
Attempting to run on a file. ``` File "/usr/local/lib/python3.12/site-packages/polyfile/polyfile.py", line 314, in mime_types for match in self.magic_matcher.match(MatchContext.load(f, only_match_mime=True)): File "/usr/local/lib/python3.12/site-packages/polyfile/magic.py", line 2750, in match if m and (not to_match.only_match_mime or...
Running the latest version under Ubuntu 22.04, certain specific JPG files cause a ValueError exception in [magic.py line 2583](https://github.com/trailofbits/polyfile/blob/77ec810fcf28fb250b78289429c29582e2f2a335/polyfile/magic.py#L2583C30-L2583C41): ```python elif "%" in result_str.replace("%%", ""): result_str = result_str.replace("%lld", "%d") #
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 6.0.1. Release notes Sourced from actions/checkout's releases. v6.0.1 What's Changed Update all references from v5 and v4 to v6 by @ericsciple in actions/checkout#2314 Add worktree...
This fixes issue #12 where certain malformed PDFs would cause "List index out of range" errors during parsing. Changes to PDFList.load(): - Handle empty lists by returning zero-length wrapper at...