ReFirmLabs / binwalk

Firmware Analysis Tool
MIT License
10.58k stars 1.52k forks source link

Improve shared/dynamic library search on OS X #130

Closed UniqMartin closed 9 years ago

UniqMartin commented 9 years ago

One of the easiest and probably most common way to obtain binwalk on OS X is via Homebrew. However, the experience is suboptimal for people with a non-standard installation (i.e. install location is not /usr/local). I'd like to help address that.

The problem is inside src/binwalk/core/C.py, lines 128–131, that searches the following directories on OS X:

My idea for a solution would be:

If this is an acceptable solution, I can try to come up with a pull request that implements this, though my Python skills are quite limited.

devttys0 commented 9 years ago

Thanks for the offer! The C library dependencies have always been a PITA, on all platforms.

This is why there is no active code in the master branch that uses any C libraries; everything is now pure Python, so this should no longer be an issue. A stable release based on the current master branch is forthcoming.

Linux/OSX/Windows users can just run setup.py install to get up and running, though Python2 users are encouraged to install the python-lzma module (this module is now standard in Python3); see the INSTALL.md file for more info.

UniqMartin commented 9 years ago

Thanks for the quick response! I had failed to see that the only code referencing a shared library (binwalk.modules.hashmatch.HashMatch using libfuzzy) was no longer active …