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

OFRAK fixes for Windows #261

Merged

Conversation

rbs-jacob
Copy link
Member

One sentence summary of this PR (This should go in the CHANGELOG!)

These changes fix both pip install ofrak on Windows, and ofrak unpack on Windows.

Anyone you think should look at this, specifically?
@EdwardLarson @whyitfor

@rbs-jacob rbs-jacob requested a review from whyitfor March 20, 2023 23:01
@rbs-jacob
Copy link
Member Author

Though this PR isn't a draft and could theoretically be merged at any time, I'll leave it open for a bit while I look for other possible fixes to incorporate. I'll re-request review if applicable.

@whyitfor
Copy link
Contributor

whyitfor commented Mar 29, 2023

Per @rbs-jacob, there are a few other things that need to be added to this.

Also, @rbs-jacob can you update the changelog?

@morpheuslord
Copy link

I am getting this error
Traceback (most recent call last):

  File "C:\Users\Chira\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Chira\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\Chira\AppData\Local\Programs\Python\Python310\Scripts\ofrak.exe\__main__.py", line 4, in <module>
  File "C:\Users\Chira\AppData\Local\Programs\Python\Python310\lib\site-packages\ofrak\__init__.py", line 8, in <module>
    from ofrak.ofrak_context import OFRAK, OFRAKContext
  File "C:\Users\Chira\AppData\Local\Programs\Python\Python310\lib\site-packages\ofrak\ofrak_context.py", line 13, in <module>
    from ofrak.core.binary import GenericBinary
  File "C:\Users\Chira\AppData\Local\Programs\Python\Python310\lib\site-packages\ofrak\core\__init__.py", line 1, in <module>
    from ofrak.core.elf.model import *
  File "C:\Users\Chira\AppData\Local\Programs\Python\Python310\lib\site-packages\ofrak\core\elf\model.py", line 19, in <module>
    from ofrak.core.magic import MagicDescriptionIdentifier
  File "C:\Users\Chira\AppData\Local\Programs\Python\Python310\lib\site-packages\ofrak\core\magic.py", line 5, in <module>
    import magic
  File "C:\Users\Chira\AppData\Local\Programs\Python\Python310\lib\site-packages\magic\__init__.py", line 209, in <module>
    libmagic = loader.load_lib()
  File "C:\Users\Chira\AppData\Local\Programs\Python\Python310\lib\site-packages\magic\loader.py", line 49, in load_lib
    raise ImportError('failed to find libmagic.  Check your installation')
ImportError: failed to find libmagic.  Check your installation

@rbs-jacob
Copy link
Member Author

rbs-jacob commented Apr 4, 2023

I am getting this error Traceback (most recent call last):

...

@morpheuslord To fix this error, run the following from the console:

python -m pip uninstall python-magic python-magic-bin
python -m pip install --upgrade python-magic-bin

@rbs-jacob rbs-jacob merged commit d7dec2b into redballoonsecurity:master Apr 5, 2023
5 checks passed
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

Successfully merging this pull request may close these issues.

None yet

4 participants