Comments (9)
You shouldn't have gotten this error with file-5.14; make sure that you also installed the file-5.14 python wrapper, and that all other python magic wrappers are removed from your system.
With that said, you should never get this error with the binwalk code from the master branch. It has had its own libmagic python wrapper for some time to address these types of issues: https://github.com/devttys0/binwalk/blob/master/src/binwalk/core/magic.py
from binwalk.
Hi,
On CentOS with the file-5.14 intalled still doesn't work. With the PyQt or PySide installed, at runtime the error "PyQt needs the Qt 4.7 or above to work". The PyQt and PySide are installed by yum and your dependents packages are Qt 4.6 (fail on repository). Ok, i'm back to FreeBSD and installation work like a charm. But...
[fronald@sagan] ~/Labs/D-Link 2500-E% binwalk dlink2500e_retail.img
Segmentation fault
This error can appear because the master version is unstable? I'm running Python 2.7.6 on FreeBSD 10.
from binwalk.
Hmmm, possibly related to issue #30? Try running it in python with the -O switch and see if you get any debug output before the crash:
$ python -O $(which binwalk) dlink2500e_retail.img
from binwalk.
Do it. And the error is:
DEBUG: libmagic.magic_open(0x328000)
DEBUG: libmagic.magic_load(0x1C19480, /tmp/tmpZGMiiX)
Segmentation fault
Curiously on the my Mac machine, the very similar error appear too. Segmentation fault at libmagic. This information help anything?
from binwalk.
The library integrity apparently is ok...
[fronald@capiroto] ~/Labs/D-Link% du -h /usr/lib/libmagic.so.4
102K /usr/lib/libmagic.so.4
[fronald@capiroto] ~/Labs/D-Link% ldd /usr/lib/libmagic.so
/usr/lib/libmagic.so:
libz.so.6 => /lib/libz.so.6 (0x801619000)
libc.so.7 => /lib/libc.so.7 (0x80081d000)
[fronald@capiroto] ~/Labs/D-Link% nm -D /usr/lib/libmagic.so.4
U _CurrentRuneLocale
U _DefaultRuneLocale
w _Jv_RegisterClasses
U _ThreadRuneLocale
U ___runetype
U __assert
0000000000218d04 A __bss_start
w __cxa_finalize
U __error
U __mb_sb_limit
U __stack_chk_fail
U __stack_chk_guard
U __stderrp
U __stdoutp
U __tls_get_addr
0000000000218d04 A _edata
0000000000218f58 A _end
00000000000147e8 T _fini
0000000000003aa8 T init
U abort
U access
U asctime
U asprintf
U calloc
000000000000b520 T cdf_count_chain
000000000000ab90 T cdf_ctime
000000000000c6d0 T cdf_print_classid
000000000000c7a0 T cdf_print_elapsed_time
000000000000c750 T cdf_print_property_name
000000000000b990 T cdf_read_dir
000000000000af90 T cdf_read_header
000000000000b580 T cdf_read_long_sector_chain
000000000000bff0 T cdf_read_property_info
000000000000b280 T cdf_read_sat
000000000000b140 T cdf_read_sector
000000000000b950 T cdf_read_sector_chain
000000000000b200 T cdf_read_short_sector
000000000000b740 T cdf_read_short_sector_chain
000000000000be40 T cdf_read_short_stream
000000000000bca0 T cdf_read_ssat
000000000000beb0 T cdf_read_summary_info
000000000000aec0 T cdf_swap_class
000000000000ade0 T cdf_swap_dir
000000000000ac30 T cdf_swap_header
000000000000ab80 T cdf_timespec_to_timestamp
000000000000a880 T cdf_timestamp_to_timespec
000000000000abd0 T cdf_tole2
000000000000abf0 T cdf_tole4
000000000000ac10 T cdf_tole8
000000000000af10 T cdf_unpack_dir
000000000000ad40 T cdf_unpack_header
000000000000c540 T cdf_unpack_summary_info
U close
U closedir
U ctime
U dup
U dup2
U execvp
U exit
U fclose
U fcntl
U fflush
000000000000e2e0 T file_apprentice
00000000000139b0 T file_ascmagic
0000000000013a90 T file_ascmagic_with_encoding
0000000000012660 T file_badread
0000000000012630 T file_badseek
0000000000012690 T file_buffer
0000000000012e00 T file_check_mem
000000000000e290 T file_delmagic
0000000000014260 T file_encoding
00000000000123c0 T file_error
000000000000cf50 T file_fmttime
0000000000218eb0 B file_formats
000000000000d9f0 T file_fsmagic
0000000000012b00 T file_getbuffer
0000000000012120 T file_is_tar
0000000000014630 T file_looks_utf8
0000000000012520 T file_magerror
000000000000d010 T file_magwarn
000000000000c980 T file_mdump
0000000000218d60 B file_names
0000000000015740 R file_nformats
0000000000015748 R file_nnames
0000000000012600 T file_oomem
00000000000137b0 T file_pipe2file
0000000000012ea0 T file_printedlen
0000000000012490 T file_printf
000000000000ecb0 T file_pstring_get_length
000000000000ec50 T file_pstring_length_size
0000000000012ec0 T file_replace
0000000000012a90 T file_reset
000000000000eb20 T file_showstr
000000000000ea10 T file_signextend
0000000000004450 T file_softmagic
0000000000009ed0 T file_trycdf
0000000000007980 T file_tryelf
0000000000012330 T file_vprintf
0000000000013020 T file_zmagic
U fopen
U fork
U fprintf
U fputc
U free
U fstat
U fwrite
U getenv
U getline
U gmtime
U inflate
U inflateEnd
U inflateInit2
U ioctl
U localtime
U lseek
U lstat
000000000000d880 T magic_buffer
000000000000d480 T magic_check
000000000000d310 T magic_close
000000000000d410 T magic_compile
000000000000d560 T magic_descriptor
000000000000d900 T magic_errno
000000000000d8e0 T magic_error
000000000000d870 T magic_file
000000000000d110 T magic_getpath
000000000000d4f0 T magic_list
000000000000d390 T magic_load
000000000000d270 T magic_open
000000000000d300 T magic_setflags
U malloc
U mbrtowc
U memchr
U memcmp
U memcpy
U memset
U mkstemp
U mktime
U mmap
U munmap
U open
U opendir
U pipe
U printf
U puts
U qsort
U read
U readdir
U readlink
U realloc
U regcomp
U regerror
U regexec
U regfree
U select
U snprintf
0000000000013600 T sread
U stat
U strchr
U strcmp
U strcspn
U strdup
U strerror
U strlcat
U strlcpy
U strlen
U strncmp
U strndup
U strrchr
U strstr
U strtod
U strtof
U strtol
U strtoul
U strtoull
U time
U unlink
U utimes
U vasprintf
U vfprintf
U waitpid
U write
from binwalk.
What the Linux distribution you use to develop binwalk? I can download and install that version in a virtual machine to test. If all ok, i'm back to FreeBSD to help you with the deploy. I can create a package for binwalk to FreeBSD and contribute with the project.
from binwalk.
From the debug output, it looks like it is crashing in libmagic's magic_load. This could be due to a bug in the new libmagic wrapper, or libmagic version incompatibilities.
I'm currently running on Ubuntu 12.04 with no problems; IIRC, I'm just using the libmagic that came with the distro - I'll try upgrading to 5.14 and see if I can replicate the issue.
from binwalk.
I've just tested binwalk on Ubuntu with both libmagic v5.09 and v5.14 without any issues. However, I may know what was causing your original problem..
When I installed the newer file v5.14, the supporting libraries (e.g., libmagic) were installed to /usr/local/lib; so even though the file utility reported that it was v5.14, the old libraries were still in the /usr/lib directory, so binwalk was still loading the older library (/usr/lib was first in my system's search path). Is this the case on your CentOS system as well?
from binwalk.
Binwalk now includes all core dependencies; if you grab the latest code from master, you shouldn't have these install problems anymore. The segfault (issue #30) has also been fixed.
from binwalk.
Related Issues (20)
- files are extracted in the wrong directory
- No module named 'binwalk.__main__' HOT 2
- Error when installing ubi_reader in deps.sh HOT 2
- Anti-patterns in extractor.py module
- Binwalk stuck when extracting .xz archive
- Cannot extract anything from a device, not file
- If providing more than one file, binwalk uses verbose mode only.
- AttributeError: module 'binwalk' has no attribute 'scan'
- Symlink Error
- ubireader problem HOT 6
- Unable to proceed from the installation guide.
- Add support for ArchLinux in deps.sh
- Would it be possible to use the built-in python module 'getpass' as a somewhat OS agnostic way to get the username? HOT 2
- Dockerfile fails to build due to ubi_reader changes HOT 1
- binwalk fails to extract after filename/extension confusion HOT 3
- Call plugins when Result is Valid
- Name 'np' is not defined while calculating file entropy. HOT 1
- deprecated nose dependency, deprecated used of setup.py test
- Python 3.12 compatibility issue: No module named 'imp' HOT 4
- Trouble extracting cpio embedded into kernel file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from binwalk.