From 4a12f8317d4248c4844450e6cf3f6ec4e86f8790506ba8e6709e831cc5536e4b Mon Sep 17 00:00:00 2001 From: Boris Manojlovic Date: Tue, 12 Aug 2014 11:44:20 +0000 Subject: [PATCH] Accepting request 244295 from home:bmanojlovic:branches:devel:tools fixed all bundles for newer releases for older < 1230 bundling is necessary and easier OBS-URL: https://build.opensuse.org/request/show/244295 OBS-URL: https://build.opensuse.org/package/show/devel:tools/binwalk?expand=0&rev=4 --- binwalk-1.2.1.tar.gz | 3 - binwalk-2.0.1.tar.gz | 3 + binwalk.1 | 166 +++++++++++++++++++++++++++++++++++++++++++ binwalk.changes | 12 ++++ binwalk.spec | 63 ++++++++++------ 5 files changed, 221 insertions(+), 26 deletions(-) delete mode 100644 binwalk-1.2.1.tar.gz create mode 100644 binwalk-2.0.1.tar.gz create mode 100644 binwalk.1 diff --git a/binwalk-1.2.1.tar.gz b/binwalk-1.2.1.tar.gz deleted file mode 100644 index 4e43051..0000000 --- a/binwalk-1.2.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5d286900b01af22499ac86f9fab7f8fb430e00e2c4cdafc142573837e16eb0c1 -size 89964 diff --git a/binwalk-2.0.1.tar.gz b/binwalk-2.0.1.tar.gz new file mode 100644 index 0000000..56fca79 --- /dev/null +++ b/binwalk-2.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90ee8426d71e91b62dfe4a1446c457bc7835b475b28717859e275a0494403959 +size 2234469 diff --git a/binwalk.1 b/binwalk.1 new file mode 100644 index 0000000..11be7cd --- /dev/null +++ b/binwalk.1 @@ -0,0 +1,166 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3. +.TH BINWALK "1" "August 2014" "binwalk VERSION_STRING" "User Commands" +.SH NAME +binwalk \- manual page for binwalk VERSION_STRING +.SH SYNOPSIS +.B binwalk +[\fIOPTIONS\fR] [\fIFILE1\fR] [\fIFILE2\fR] [\fIFILE3\fR] ... +.SH DESCRIPTION +Binwalk v2.0.0 +Craig Heffner, http://www.binwalk.org +.SS "Signature Scan Options:" +.TP +\fB\-B\fR, \fB\-\-signature\fR +Scan target file(s) for common file signatures +.TP +\fB\-R\fR, \fB\-\-raw=\fR +Scan target file(s) for the specified sequence of bytes +.TP +\fB\-A\fR, \fB\-\-opcodes\fR +Scan target file(s) for common executable opcodes +.TP +\fB\-C\fR, \fB\-\-cast\fR +Cast offsets as a given data type (use \fB\-y\fR to specify the data type / endianess) +.TP +\fB\-m\fR, \fB\-\-magic=\fR +Specify a custom magic file to use +.TP +\fB\-b\fR, \fB\-\-dumb\fR +Disable smart signature keywords +.SS "Extraction Options:" +.TP +\fB\-e\fR, \fB\-\-extract\fR +Automatically extract known file types +.TP +\fB\-D\fR, \fB\-\-dd=\fR +Extract signatures, give the files an extension of , and execute +.TP +\fB\-M\fR, \fB\-\-matryoshka\fR +Recursively scan extracted files +.TP +\fB\-d\fR, \fB\-\-depth=\fR +Limit matryoshka recursion depth (default: 8 levels deep) +.TP +\fB\-j\fR, \fB\-\-size=\fR +Limit the size of each extracted file +.TP +\fB\-r\fR, \fB\-\-rm\fR +Cleanup extracted / zero\-size files after extraction +.TP +\fB\-z\fR, \fB\-\-carve\fR +Carve data from files, but don't execute extraction utilities +.SS "Entropy Analysis Options:" +.TP +\fB\-E\fR, \fB\-\-entropy\fR +Calculate file entropy +.TP +\fB\-J\fR, \fB\-\-save\fR +Save plot as a PNG +.TP +\fB\-N\fR, \fB\-\-nplot\fR +Do not generate an entropy plot graph +.TP +\fB\-Q\fR, \fB\-\-nlegend\fR +Omit the legend from the entropy plot graph +.SS "Binary Visualization Options:" +.TP +\fB\-3\fR, \fB\-\-3D\fR +Generate a 3D binary visualization +.TP +\fB\-2\fR, \fB\-\-2D\fR +Project data points onto 3D cube walls only +.TP +\fB\-Z\fR, \fB\-\-points=\fR +Set the maximum number of plotted data points +.TP +\fB\-V\fR, \fB\-\-grids\fR +Display the x\-y\-z grids in the resulting plot +.SS "Binary Diffing Options:" +.TP +\fB\-W\fR, \fB\-\-hexdump\fR +Perform a hexdump / diff of a file or files +.TP +\fB\-G\fR, \fB\-\-green\fR +Only show lines containing bytes that are the same among all files +.TP +\fB\-i\fR, \fB\-\-red\fR +Only show lines containing bytes that are different among all files +.TP +\fB\-U\fR, \fB\-\-blue\fR +Only show lines containing bytes that are different among some files +.TP +\fB\-w\fR, \fB\-\-terse\fR +Diff all files, but only display a hex dump of the first file +.SS "Heuristic Compression Options:" +.TP +\fB\-H\fR, \fB\-\-heuristic\fR +Heuristically classify high entropy data +.TP +\fB\-a\fR, \fB\-\-trigger=\fR +Set the entropy trigger level (0.0 \- 1.0, default: 0.90) +.SS "Fuzzy Hash Options:" +.TP +\fB\-F\fR, \fB\-\-fuzzy\fR +Perform fuzzy hash matching on files/directories +.TP +\fB\-u\fR, \fB\-\-cutoff=\fR +Set the cutoff percentage +.TP +\fB\-S\fR, \fB\-\-strings\fR +Diff strings inside files instead of the entire file +.TP +\fB\-s\fR, \fB\-\-same\fR +Only show files that are the same +.TP +\fB\-p\fR, \fB\-\-diff\fR +Only show files that are different +.TP +\fB\-n\fR, \fB\-\-name\fR +Only compare files whose base names are the same +.TP +\fB\-L\fR, \fB\-\-symlinks\fR +Don't ignore symlinks +.SS "Raw Compression Options:" +.TP +\fB\-X\fR, \fB\-\-deflate\fR +Scan for raw deflate compression streams +.SS "General Options:" +.TP +\fB\-l\fR, \fB\-\-length=\fR +Number of bytes to scan +.TP +\fB\-o\fR, \fB\-\-offset=\fR +Start scan at this file offset +.TP +\fB\-K\fR, \fB\-\-block=\fR +Set file block size +.TP +\fB\-g\fR, \fB\-\-swap=\fR +Reverse every n bytes before scanning +.TP +\fB\-I\fR, \fB\-\-invalid\fR +Show results marked as invalid +.TP +\fB\-x\fR, \fB\-\-exclude=\fR +Exclude results that match +.TP +\fB\-y\fR, \fB\-\-include=\fR +Only show results that match +.TP +\fB\-f\fR, \fB\-\-log=\fR +Log results to file +.TP +\fB\-c\fR, \fB\-\-csv\fR +Log results to file in CSV format +.TP +\fB\-t\fR, \fB\-\-term\fR +Format output to fit the terminal window +.TP +\fB\-q\fR, \fB\-\-quiet\fR +Supress output to stdout +.TP +\fB\-v\fR, \fB\-\-verbose\fR +Enable verbose output +.TP +\fB\-h\fR, \fB\-\-help\fR +Show help output diff --git a/binwalk.changes b/binwalk.changes index def387d..284acee 100644 --- a/binwalk.changes +++ b/binwalk.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Mon Aug 4 09:20:11 UTC 2014 - boris@steki.net + +- updated to latest upstream 2.0.1 + + Python3 support + + Raw deflate detection/extraction + + Improved API + + Improved speed + + More (and improved) signatures + + Faster entropy scans +- Project has moved from google code hosting to github + ------------------------------------------------------------------- Mon Sep 23 13:13:57 UTC 2013 - vcizek@suse.com diff --git a/binwalk.spec b/binwalk.spec index f5e5bc4..db5a8ba 100644 --- a/binwalk.spec +++ b/binwalk.spec @@ -1,7 +1,7 @@ # -# spec file for package +# spec file for package binwalk # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,24 +15,34 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild Name: binwalk -Version: 1.2.1 +Version: 2.0.1 Release: 0 -License: MIT Summary: Firmware Analysis Tool -Url: http://code.google.com/p/binwalk/ +License: MIT Group: Development/Tools/Debuggers -Source0: http://binwalk.googlecode.com/files/%{name}-%{version}.tar.gz -BuildArch: noarch +Url: https://github.com/devttys0/binwalk +Source0: https://github.com/devttys0/binwalk/archive/v%{version}/binwalk-%{version}.tar.gz +Source1: binwalk.1 +BuildRequires: file-devel +BuildRequires: python-devel BuildRequires: python-magic -BuildRequires: python-matplotlib -BuildRequires: python-matplotlib-tk -Requires: python +%if 0%{?suse_version} >= 1230 +BuildRequires: libfuzzy-devel +%endif +# Required by help2man +BuildRequires: python-curses +BuildRequires: help2man Requires: python-magic -Requires: python-matplotlib -Requires: python-matplotlib-tk +Requires: python-pyqtgraph +Requires: python-scipy +%if 0%{?suse_version} >= 1230 +Requires: libfuzzy2 +%endif +# sle requires it... +BuildRoot: %{_tmppath}/%{name}-%{version}-build + %description Binwalk is a tool for searching a given binary image for embedded files and executable code. @@ -45,23 +55,30 @@ found in firmware images such as compressed/archived files, firmware headers, Li %setup -q %build -pushd src +%if 0%{?suse_version} >= 1230 +%configure --disable-bundles +%else +%configure --disable-libmagic --disable-pyqtgraph +%endif + +make %{?_smp_mflags} %{__python} setup.py build -popd +%if 0%{?suse_version} >= 1140 +%{__python} setup.py install --prefix=%{_prefix} --root=$(pwd)/h2m +echo |PYTHONPATH=./h2m/%{_prefix}/%{python_sitelib} help2man -N --version-string=%{version} ./h2m/%{_prefix}/bin/binwalk > binwalk.1 +rm -rf h2m +%else +sed -e 's/VERSION_STRING/%{version}/g' %{S:1} > binwalk.1 +%endif %install -pushd src %{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot} -popd - +install -Dm0644 binwalk.1 %{buildroot}%{_mandir}/man1/binwalk.1 %files %defattr(-,root,root) -%doc docs/* %{_bindir}/%{name} %{python_sitelib}/%{name}/ -%{python_sitelib}/binwalk-1.2-py2.7.egg-info - - +%{python_sitelib}/binwalk-*-py%{py_ver}.egg-info +%{_mandir}/man1/binwalk.1* %changelog -