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
4102d1f0
Commit
4102d1f0
authored
Dec 21, 2013
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
block value only affects heuristic blocks when -H is specified
parent
11a020c1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
entropy.py
src/binwalk/modules/entropy.py
+6
-1
heuristics.py
src/binwalk/modules/heuristics.py
+2
-1
No files found.
src/binwalk/modules/entropy.py
View file @
4102d1f0
...
@@ -17,6 +17,8 @@ class Entropy(Module):
...
@@ -17,6 +17,8 @@ class Entropy(Module):
COLORS
=
[
'r'
,
'g'
,
'c'
,
'b'
,
'm'
]
COLORS
=
[
'r'
,
'g'
,
'c'
,
'b'
,
'm'
]
DEFAULT_BLOCK_SIZE
=
1024
TITLE
=
"Entropy"
TITLE
=
"Entropy"
ORDER
=
8
ORDER
=
8
...
@@ -45,7 +47,7 @@ class Entropy(Module):
...
@@ -45,7 +47,7 @@ class Entropy(Module):
Kwarg
(
name
=
'display_results'
,
default
=
True
),
Kwarg
(
name
=
'display_results'
,
default
=
True
),
Kwarg
(
name
=
'do_plot'
,
default
=
True
),
Kwarg
(
name
=
'do_plot'
,
default
=
True
),
Kwarg
(
name
=
'show_legend'
,
default
=
True
),
Kwarg
(
name
=
'show_legend'
,
default
=
True
),
Kwarg
(
name
=
'block_size'
,
default
=
1024
),
Kwarg
(
name
=
'block_size'
,
default
=
0
),
]
]
# Run this module last so that it can process all other module's results and overlay them on the entropy graph
# Run this module last so that it can process all other module's results and overlay them on the entropy graph
...
@@ -75,8 +77,11 @@ class Entropy(Module):
...
@@ -75,8 +77,11 @@ class Entropy(Module):
if
self
.
file_markers
:
if
self
.
file_markers
:
self
.
display_results
=
False
self
.
display_results
=
False
if
not
self
.
block_size
:
if
self
.
config
.
block
:
if
self
.
config
.
block
:
self
.
block_size
=
self
.
config
.
block
self
.
block_size
=
self
.
config
.
block
else
:
self
.
block_size
=
self
.
DEFAULT_BLOCK_SIZE
def
run
(
self
):
def
run
(
self
):
from
pyqtgraph.Qt
import
QtGui
from
pyqtgraph.Qt
import
QtGui
...
...
src/binwalk/modules/heuristics.py
View file @
4102d1f0
...
@@ -83,6 +83,7 @@ class HeuristicCompressionAnalyzer(Module):
...
@@ -83,6 +83,7 @@ class HeuristicCompressionAnalyzer(Module):
ENTROPY_TRIGGER
=
.
90
ENTROPY_TRIGGER
=
.
90
MIN_BLOCK_SIZE
=
4096
MIN_BLOCK_SIZE
=
4096
BLOCK_OFFSET
=
1024
BLOCK_OFFSET
=
1024
ENTROPY_BLOCK_SIZE
=
1024
TITLE
=
"Heuristic Compression"
TITLE
=
"Heuristic Compression"
...
@@ -91,7 +92,7 @@ class HeuristicCompressionAnalyzer(Module):
...
@@ -91,7 +92,7 @@ class HeuristicCompressionAnalyzer(Module):
attribute
=
'config'
),
attribute
=
'config'
),
Dependency
(
name
=
'Entropy'
,
Dependency
(
name
=
'Entropy'
,
attribute
=
'entropy'
,
attribute
=
'entropy'
,
kwargs
=
{
'enabled'
:
True
,
'do_plot'
:
False
,
'display_results'
:
False
}),
kwargs
=
{
'enabled'
:
True
,
'do_plot'
:
False
,
'display_results'
:
False
,
'block_size'
:
ENTROPY_BLOCK_SIZE
}),
]
]
{
'config'
:
'Configuration'
,
'entropy'
:
'Entropy'
}
{
'config'
:
'Configuration'
,
'entropy'
:
'Entropy'
}
...
...
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