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
77685bb0
Commit
77685bb0
authored
Nov 19, 2014
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Entropy analysis now provides a summary by default; --verbose enables full output
parent
f330cbb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
entropy.py
src/binwalk/modules/entropy.py
+16
-4
No files found.
src/binwalk/modules/entropy.py
View file @
77685bb0
...
@@ -23,6 +23,9 @@ class Entropy(Module):
...
@@ -23,6 +23,9 @@ class Entropy(Module):
DEFAULT_BLOCK_SIZE
=
1024
DEFAULT_BLOCK_SIZE
=
1024
DEFAULT_DATA_POINTS
=
2048
DEFAULT_DATA_POINTS
=
2048
DEFAULT_TRIGGER_HIGH
=
0.95
DEFAULT_TRIGGER_LOW
=
0.85
TITLE
=
"Entropy Analysis"
TITLE
=
"Entropy Analysis"
ORDER
=
8
ORDER
=
8
...
@@ -32,7 +35,7 @@ class Entropy(Module):
...
@@ -32,7 +35,7 @@ class Entropy(Module):
long
=
'entropy'
,
long
=
'entropy'
,
kwargs
=
{
'enabled'
:
True
},
kwargs
=
{
'enabled'
:
True
},
description
=
'Calculate file entropy'
),
description
=
'Calculate file entropy'
),
Option
(
short
=
'
H
'
,
Option
(
short
=
'
F
'
,
long
=
'fast'
,
long
=
'fast'
,
kwargs
=
{
'use_zlib'
:
True
},
kwargs
=
{
'use_zlib'
:
True
},
description
=
'Use faster, but less detailed, entropy analysis'
),
description
=
'Use faster, but less detailed, entropy analysis'
),
...
@@ -44,6 +47,16 @@ class Entropy(Module):
...
@@ -44,6 +47,16 @@ class Entropy(Module):
long
=
'nplot'
,
long
=
'nplot'
,
kwargs
=
{
'do_plot'
:
False
},
kwargs
=
{
'do_plot'
:
False
},
description
=
'Do not generate an entropy plot graph'
),
description
=
'Do not generate an entropy plot graph'
),
Option
(
short
=
'H'
,
long
=
'high'
,
type
=
int
,
kwargs
=
{
'trigger_high'
:
DEFAULT_TRIGGER_HIGH
},
description
=
'Set the rising edge entropy trigger threshold (default:
%.2
f)'
%
DEFAULT_TRIGGER_HIGH
),
Option
(
short
=
'L'
,
long
=
'low'
,
type
=
int
,
kwargs
=
{
'trigger_low'
:
DEFAULT_TRIGGER_LOW
},
description
=
'Set the falling edge entropy trigger threshold (default:
%.2
f)'
%
DEFAULT_TRIGGER_LOW
),
Option
(
short
=
'Q'
,
Option
(
short
=
'Q'
,
long
=
'nlegend'
,
long
=
'nlegend'
,
kwargs
=
{
'show_legend'
:
False
},
kwargs
=
{
'show_legend'
:
False
},
...
@@ -53,6 +66,8 @@ class Entropy(Module):
...
@@ -53,6 +66,8 @@ class Entropy(Module):
KWARGS
=
[
KWARGS
=
[
Kwarg
(
name
=
'enabled'
,
default
=
False
),
Kwarg
(
name
=
'enabled'
,
default
=
False
),
Kwarg
(
name
=
'save_plot'
,
default
=
False
),
Kwarg
(
name
=
'save_plot'
,
default
=
False
),
Kwarg
(
name
=
'trigger_high'
,
default
=
DEFAULT_TRIGGER_HIGH
),
Kwarg
(
name
=
'trigger_low'
,
default
=
DEFAULT_TRIGGER_LOW
),
Kwarg
(
name
=
'use_zlib'
,
default
=
False
),
Kwarg
(
name
=
'use_zlib'
,
default
=
False
),
Kwarg
(
name
=
'display_results'
,
default
=
True
),
Kwarg
(
name
=
'display_results'
,
default
=
True
),
Kwarg
(
name
=
'do_plot'
,
default
=
True
),
Kwarg
(
name
=
'do_plot'
,
default
=
True
),
...
@@ -68,9 +83,6 @@ class Entropy(Module):
...
@@ -68,9 +83,6 @@ class Entropy(Module):
self
.
max_description_length
=
0
self
.
max_description_length
=
0
self
.
file_markers
=
{}
self
.
file_markers
=
{}
self
.
trigger_high
=
.
95
self
.
trigger_low
=
.
85
if
self
.
use_zlib
:
if
self
.
use_zlib
:
self
.
algorithm
=
self
.
gzip
self
.
algorithm
=
self
.
gzip
else
:
else
:
...
...
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