Bug 1111576 - binwalk unable to parse any file
Summary: binwalk unable to parse any file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: binwalk
Version: 20
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Scott Talbert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-20 12:10 UTC by Anatoly Pugachev
Modified: 2014-11-10 18:29 UTC (History)
4 users (show)

Fixed In Version: binwalk-2.0.0-2.fc20
Clone Of:
Environment:
Last Closed: 2014-11-10 06:36:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Anatoly Pugachev 2014-06-20 12:10:43 UTC
Unable to parse any file with current version of binwalk installed:

$ rpm -q binwalk
binwalk-1.2-2.fc20.noarch

for example:

$ binwalk /usr/lib64/pygtk/2.0/demos/images/background.jpg 
/tmp/tmpyKohKD, 734: Warning: New continuation level 2 is more than one larger than current level 0
Unexpected error: cannot import name BlockFile

or 

$ binwalk hvm59520003.img 
/tmp/tmp3fZhQ2, 734: Warning: New continuation level 2 is more than one larger than current level 0
Unexpected error: cannot import name BlockFile

So, it is probably is missing BlockFile python module (packaged separately or included with binwalk).

Thanks.

Comment 1 javiertury 2014-07-14 21:20:06 UTC
Same version,

$ binwalk full_backup.bin /tmp/tmpfNzcg1, 734: Warning: New continuation level 2 is more than one larger than current level 0
/tmp/tmpfNzcg1, 854: Warning: Printf format `l' is not valid for type `belong' in description `version %ld, '
/tmp/tmpfNzcg1, 1016: Warning: Printf format `l' is not valid for type `lelong' in description `size %lu'
/tmp/tmpfNzcg1, 1021: Warning: Printf format `l' is not valid for type `lelong' in description `edition %lu,'
/tmp/tmpfNzcg1, 1023: Warning: Printf format `l' is not valid for type `lelong' in description `%lu blocks,'
/tmp/tmpfNzcg1, 1025: Warning: Printf format `l' is not valid for type `lelong' in description `%lu files'
/tmp/tmpfNzcg1, 1026: Warning: Printf format `l' is not valid for type `lelong' in description `{jump-to-offset:%lu}'
/tmp/tmpfNzcg1, 1027: Warning: Printf format `l' is not valid for type `lelong' in description `{file-size:%lu}'
/tmp/tmpfNzcg1, 1031: Warning: Printf format `l' is not valid for type `belong' in description `size %lu'
/tmp/tmpfNzcg1, 1036: Warning: Printf format `l' is not valid for type `belong' in description `edition %lu,'
/tmp/tmpfNzcg1, 1038: Warning: Printf format `l' is not valid for type `belong' in description `%lu blocks,'
/tmp/tmpfNzcg1, 1040: Warning: Printf format `l' is not valid for type `belong' in description `%lu files'
/tmp/tmpfNzcg1, 1041: Warning: Printf format `l' is not valid for type `belong' in description `{jump-to-offset:%lu}'
/tmp/tmpfNzcg1, 1042: Warning: Printf format `l' is not valid for type `belong' in description `{file-size:%lu}'
/tmp/tmpfNzcg1, 1816: Warning: Printf format `l' is not valid for type `belong' in description `, %ld x'
/tmp/tmpfNzcg1, 1817: Warning: Printf format `l' is not valid for type `belong' in description `%ld,'
/tmp/tmpfNzcg1, 1832: Warning: Printf format `h' is not valid for type `leshort' in description `%hd x'
/tmp/tmpfNzcg1, 1833: Warning: Printf format `h' is not valid for type `leshort' in description `%hd'

DECIMAL   	HEX       	DESCRIPTION
-------------------------------------------------------------------------------------------------------------------

$ rpm -q binwalk
binwalk-1.2-2.fc20.noarch

I tried using rawhide version but I got similar errors:

$ sudo yum --enablerepo=rawhide update binwalk

$ binwalk full_backup.bin 
/tmp/tmpd68ls7, 734: Warning: New continuation level 2 is more than one larger than current level 0
/tmp/tmpd68ls7, 854: Warning: Printf format `l' is not valid for type `belong' in description `version %ld, '
/tmp/tmpd68ls7, 1016: Warning: Printf format `l' is not valid for type `lelong' in description `size %lu'
/tmp/tmpd68ls7, 1021: Warning: Printf format `l' is not valid for type `lelong' in description `edition %lu,'
/tmp/tmpd68ls7, 1023: Warning: Printf format `l' is not valid for type `lelong' in description `%lu blocks,'
/tmp/tmpd68ls7, 1025: Warning: Printf format `l' is not valid for type `lelong' in description `%lu files'
/tmp/tmpd68ls7, 1026: Warning: Printf format `l' is not valid for type `lelong' in description `{jump-to-offset:%lu}'
/tmp/tmpd68ls7, 1027: Warning: Printf format `l' is not valid for type `lelong' in description `{file-size:%lu}'
/tmp/tmpd68ls7, 1031: Warning: Printf format `l' is not valid for type `belong' in description `size %lu'
/tmp/tmpd68ls7, 1036: Warning: Printf format `l' is not valid for type `belong' in description `edition %lu,'
/tmp/tmpd68ls7, 1038: Warning: Printf format `l' is not valid for type `belong' in description `%lu blocks,'
/tmp/tmpd68ls7, 1040: Warning: Printf format `l' is not valid for type `belong' in description `%lu files'
/tmp/tmpd68ls7, 1041: Warning: Printf format `l' is not valid for type `belong' in description `{jump-to-offset:%lu}'
/tmp/tmpd68ls7, 1042: Warning: Printf format `l' is not valid for type `belong' in description `{file-size:%lu}'
/tmp/tmpd68ls7, 1816: Warning: Printf format `l' is not valid for type `belong' in description `, %ld x'
/tmp/tmpd68ls7, 1817: Warning: Printf format `l' is not valid for type `belong' in description `%ld,'
/tmp/tmpd68ls7, 1832: Warning: Printf format `h' is not valid for type `leshort' in description `%hd x'
/tmp/tmpd68ls7, 1833: Warning: Printf format `h' is not valid for type `leshort' in description `%hd'

$ rpm -q binwalk
binwalk-1.2-3.fc21.noarch

Comment 2 javiertury 2014-07-14 22:18:46 UTC
So I found a partial fix, it just fixes this error:
"Warning: New continuation level 2 is more than one larger than current level 0"

Just update the signatures,
$ sudo binwalk -u

Comment 3 javiertury 2014-07-15 12:11:45 UTC
It seems that the issue is with recent versions of libmagic. On July 12th it was patched upstream:
https://github.com/devttys0/binwalk/commit/fdbcf4198b040c57d6930a516dcc1b02046a7b93

The lastest version, 1.3 beta, was released in January so it doesn't have the fix. The developer seems to be working on binwalk 2.0 since December 2013 but there isn't a release date yet.

Comment 4 Fedora Update System 2014-11-01 18:21:59 UTC
binwalk-2.0.0-2.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/binwalk-2.0.0-2.fc21

Comment 5 Fedora Update System 2014-11-01 18:22:53 UTC
binwalk-2.0.0-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/binwalk-2.0.0-2.fc20

Comment 6 Fedora Update System 2014-11-02 07:26:26 UTC
Package binwalk-2.0.0-2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing binwalk-2.0.0-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-14139/binwalk-2.0.0-2.fc20
then log in and leave karma (feedback).

Comment 7 lnie 2014-11-04 08:34:50 UTC
binwalk-2.0.0-2.fc20 works

Comment 8 Fedora Update System 2014-11-10 06:36:14 UTC
binwalk-2.0.0-2.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2014-11-10 18:29:14 UTC
binwalk-2.0.0-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.