Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
binwalk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-gitdep
binwalk
Commits
22e3e971
Commit
22e3e971
authored
Nov 20, 2017
by
devttys0
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/devttys0/binwalk
parents
eebd7f73
ce7f1f92
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
deps.sh
deps.sh
+3
-3
setup.py
setup.py
+2
-2
entropy.py
src/binwalk/modules/entropy.py
+3
-2
No files found.
deps.sh
View file @
22e3e971
...
@@ -34,15 +34,15 @@ APTGETCMD="apt-get"
...
@@ -34,15 +34,15 @@ APTGETCMD="apt-get"
YUMCMD
=
"yum"
YUMCMD
=
"yum"
if
[
$distro
=
"Kali"
]
if
[
$distro
=
"Kali"
]
then
then
APT_CANDIDATES
=
"git build-essential libqt4-opengl mtd-utils gzip bzip2 tar arj lhasa p7zip p7zip-full cabextract util-linux firmware-mod-kit cramfsswap squashfs-tools zlib1g-dev liblzma-dev liblzo2-dev sleuthkit default-jdk lzop"
APT_CANDIDATES
=
"git build-essential libqt4-opengl mtd-utils gzip bzip2 tar arj lhasa p7zip p7zip-full cabextract util-linux firmware-mod-kit cramfsswap squashfs-tools zlib1g-dev liblzma-dev liblzo2-dev sleuthkit default-jdk lzop
cpio
"
else
else
APT_CANDIDATES
=
"git build-essential libqt4-opengl mtd-utils gzip bzip2 tar arj lhasa p7zip p7zip-full cabextract cramfsprogs cramfsswap squashfs-tools zlib1g-dev liblzma-dev liblzo2-dev sleuthkit default-jdk lzop srecord"
APT_CANDIDATES
=
"git build-essential libqt4-opengl mtd-utils gzip bzip2 tar arj lhasa p7zip p7zip-full cabextract cramfsprogs cramfsswap squashfs-tools zlib1g-dev liblzma-dev liblzo2-dev sleuthkit default-jdk lzop srecord
cpio
"
fi
fi
PYTHON2_APT_CANDIDATES
=
"python-crypto python-lzo python-lzma python-pip python-tk"
PYTHON2_APT_CANDIDATES
=
"python-crypto python-lzo python-lzma python-pip python-tk"
PYTHON3_APT_CANDIDATES
=
"python3-crypto python3-pip python3-tk"
PYTHON3_APT_CANDIDATES
=
"python3-crypto python3-pip python3-tk"
PYTHON3_YUM_CANDIDATES
=
""
PYTHON3_YUM_CANDIDATES
=
""
YUM_CANDIDATES
=
"git gcc gcc-c++ make openssl-devel qtwebkit-devel qt-devel gzip bzip2 tar arj p7zip p7zip-plugins cabextract squashfs-tools zlib zlib-devel lzo lzo-devel xz xz-compat-libs xz-libs xz-devel xz-lzma-compat python-backports-lzma lzip pyliblzma perl-Compress-Raw-Lzma lzop srecord"
YUM_CANDIDATES
=
"git gcc gcc-c++ make openssl-devel qtwebkit-devel qt-devel gzip bzip2 tar arj p7zip p7zip-plugins cabextract squashfs-tools zlib zlib-devel lzo lzo-devel xz xz-compat-libs xz-libs xz-devel xz-lzma-compat python-backports-lzma lzip pyliblzma perl-Compress-Raw-Lzma lzop srecord"
PYTHON2_YUM_CANDIDATES
=
"python-pip python-Bottleneck"
PYTHON2_YUM_CANDIDATES
=
"python-pip python-Bottleneck
cpio
"
APT_CANDIDATES
=
"
$APT_CANDIDATES
$PYTHON2_APT_CANDIDATES
"
APT_CANDIDATES
=
"
$APT_CANDIDATES
$PYTHON2_APT_CANDIDATES
"
YUM_CANDIDATES
=
"
$YUM_CANDIDATES
$PYTHON2_YUM_CANDIDATES
"
YUM_CANDIDATES
=
"
$YUM_CANDIDATES
$PYTHON2_YUM_CANDIDATES
"
PIP_COMMANDS
=
"pip"
PIP_COMMANDS
=
"pip"
...
...
setup.py
View file @
22e3e971
...
@@ -24,8 +24,8 @@ except ImportError:
...
@@ -24,8 +24,8 @@ except ImportError:
# include the git commit hash as part of the version number reported
# include the git commit hash as part of the version number reported
# by binwalk.
# by binwalk.
try
:
try
:
label
=
subprocess
.
check_output
([
"git"
,
"
describe
"
],
stderr
=
DEVNULL
)
.
decode
(
'utf-8'
)
label
=
subprocess
.
check_output
([
"git"
,
"
rev-parse"
,
"--short"
,
"HEAD
"
],
stderr
=
DEVNULL
)
.
decode
(
'utf-8'
)
MODULE_VERSION
=
"
%
s-
%
s"
%
(
MODULE_VERSION
,
label
.
s
plit
(
'-'
)[
-
1
]
.
s
trip
())
MODULE_VERSION
=
"
%
s-
%
s"
%
(
MODULE_VERSION
,
label
.
strip
())
except
KeyboardInterrupt
as
e
:
except
KeyboardInterrupt
as
e
:
raise
e
raise
e
except
Exception
:
except
Exception
:
...
...
src/binwalk/modules/entropy.py
View file @
22e3e971
...
@@ -27,7 +27,7 @@ class Entropy(Module):
...
@@ -27,7 +27,7 @@ class Entropy(Module):
DEFAULT_TRIGGER_HIGH
=
.
95
DEFAULT_TRIGGER_HIGH
=
.
95
DEFAULT_TRIGGER_LOW
=
.
85
DEFAULT_TRIGGER_LOW
=
.
85
TITLE
=
"
Entropy Analysis
"
TITLE
=
""
ORDER
=
8
ORDER
=
8
# TODO: Add --dpoints option to set the number of data points?
# TODO: Add --dpoints option to set the number of data points?
...
@@ -270,7 +270,7 @@ class Entropy(Module):
...
@@ -270,7 +270,7 @@ class Entropy(Module):
except
AttributeError
:
except
AttributeError
:
ax
=
fig
.
add_subplot
(
1
,
1
,
1
,
autoscale_on
=
True
,
axisbg
=
'black'
)
ax
=
fig
.
add_subplot
(
1
,
1
,
1
,
autoscale_on
=
True
,
axisbg
=
'black'
)
ax
.
set_title
(
fname
)
ax
.
set_title
(
self
.
TITLE
)
ax
.
set_xlabel
(
self
.
XLABEL
)
ax
.
set_xlabel
(
self
.
XLABEL
)
ax
.
set_ylabel
(
self
.
YLABEL
)
ax
.
set_ylabel
(
self
.
YLABEL
)
ax
.
plot
(
x
,
y
,
'y'
,
lw
=
2
)
ax
.
plot
(
x
,
y
,
'y'
,
lw
=
2
)
...
@@ -278,6 +278,7 @@ class Entropy(Module):
...
@@ -278,6 +278,7 @@ class Entropy(Module):
# Add a fake, invisible plot entry so that offsets at/near the
# Add a fake, invisible plot entry so that offsets at/near the
# minimum x value (0) are actually visible on the plot.
# minimum x value (0) are actually visible on the plot.
ax
.
plot
(
-
(
max
(
x
)
*.
001
),
1.1
,
lw
=
0
)
ax
.
plot
(
-
(
max
(
x
)
*.
001
),
1.1
,
lw
=
0
)
ax
.
plot
(
-
(
max
(
x
)
*.
001
),
0
,
lw
=
0
)
if
self
.
show_legend
and
has_key
(
self
.
file_markers
,
fname
):
if
self
.
show_legend
and
has_key
(
self
.
file_markers
,
fname
):
for
(
offset
,
description
)
in
self
.
file_markers
[
fname
]:
for
(
offset
,
description
)
in
self
.
file_markers
[
fname
]:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment