Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes with NotImplementedError #3420

Open
BonusPlay opened this issue Jun 24, 2024 · 2 comments
Open

Crashes with NotImplementedError #3420

BonusPlay opened this issue Jun 24, 2024 · 2 comments

Comments

@BonusPlay
Copy link

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 any(t is not None for t in m.mimetypes)):
     ^
File "/usr/local/lib/python3.12/site-packages/polyfile/magic.py", line 2531, in __bool__
  return any(m for m in self.mimetypes) or any(e for e in self.extensions) or bool(self.message())
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/polyfile/magic.py", line 2531, in <genexpr>
  return any(m for m in self.mimetypes) or any(e for e in self.extensions) or bool(self.message())
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/polyfile/iterators.py", line 44, in __iter__
  yield self[i]
        ~~~~^^^
File "/usr/local/lib/python3.12/site-packages/polyfile/iterators.py", line 30, in __getitem__
  self._items.append(next(self._source_iter))
                     ^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/polyfile/iterators.py", line 54, in unique
  for t in iterator:
File "/usr/local/lib/python3.12/site-packages/polyfile/magic.py", line 2511, in <genexpr>
  return LazyIterableSet((
                         ^
File "/usr/local/lib/python3.12/site-packages/polyfile/magic.py", line 2561, in __iter__
  yield self[i]
        ~~~~^^^
File "/usr/local/lib/python3.12/site-packages/polyfile/magic.py", line 2545, in __getitem__
  result = next(self._result_iter)
           ^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/polyfile/magic.py", line 946, in _match
  yield from child._match(context=context, parent_match=m)
File "/usr/local/lib/python3.12/site-packages/polyfile/magic.py", line 946, in _match
  yield from child._match(context=context, parent_match=m)
File "/usr/local/lib/python3.12/site-packages/polyfile/magic.py", line 2278, in _match
  raise NotImplementedError("TODO: Add support for use tests with flipped endianness")
@ESultanik
Copy link
Collaborator

This must be due to a newer addition to the libmagic pattern library.

Are you able to share the file that caused this error?

@BonusPlay
Copy link
Author

Sure, here's example file. I'll try to keep the file public until the issue is fixed.
binwalk responds with:

busybox: ELF 32-bit MSB executable, ARM, version 1 (ARM), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.0.0, stripped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants