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
1e5c176a
Commit
1e5c176a
authored
Nov 19, 2014
by
devttys0
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #85 from jmichelp/master
Make the color options not mutual exclusive
parents
551d28a3
06e04aba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
hexdiff.py
src/binwalk/modules/hexdiff.py
+10
-6
No files found.
src/binwalk/modules/hexdiff.py
View file @
1e5c176a
...
...
@@ -31,15 +31,15 @@ class HexDiff(Module):
description
=
'Perform a hexdump / diff of a file or files'
),
Option
(
short
=
'G'
,
long
=
'green'
,
kwargs
=
{
'show_green'
:
True
,
'show_blue'
:
False
,
'show_red'
:
False
},
kwargs
=
{
'show_green'
:
True
},
description
=
'Only show lines containing bytes that are the same among all files'
),
Option
(
short
=
'i'
,
long
=
'red'
,
kwargs
=
{
'show_red'
:
True
,
'show_blue'
:
False
,
'show_green'
:
False
},
kwargs
=
{
'show_red'
:
True
},
description
=
'Only show lines containing bytes that are different among all files'
),
Option
(
short
=
'U'
,
long
=
'blue'
,
kwargs
=
{
'show_blue'
:
True
,
'show_red'
:
False
,
'show_green'
:
False
},
kwargs
=
{
'show_blue'
:
True
},
description
=
'Only show lines containing bytes that are different among some files'
),
Option
(
short
=
'w'
,
long
=
'terse'
,
...
...
@@ -48,9 +48,9 @@ class HexDiff(Module):
]
KWARGS
=
[
Kwarg
(
name
=
'show_red'
,
default
=
Tru
e
),
Kwarg
(
name
=
'show_blue'
,
default
=
Tru
e
),
Kwarg
(
name
=
'show_green'
,
default
=
Tru
e
),
Kwarg
(
name
=
'show_red'
,
default
=
Fals
e
),
Kwarg
(
name
=
'show_blue'
,
default
=
Fals
e
),
Kwarg
(
name
=
'show_green'
,
default
=
Fals
e
),
Kwarg
(
name
=
'terse'
,
default
=
False
),
Kwarg
(
name
=
'enabled'
,
default
=
False
),
]
...
...
@@ -172,6 +172,10 @@ class HexDiff(Module):
loop_count
+=
1
def
init
(
self
):
# To mimic expected behavior, if all options are False, we show everything
if
not
any
([
self
.
show_red
,
self
.
show_green
,
self
.
show_blue
]):
self
.
show_red
=
self
.
show_green
=
self
.
show_blue
=
True
# Always disable terminal formatting, as it won't work properly with colorized output
self
.
config
.
display
.
fit_to_screen
=
False
...
...
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