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
62b3345d
Commit
62b3345d
authored
Dec 20, 2013
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in zlib plugin; fixed bug in verbosity.
parent
5ce83d5a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
module.py
src/binwalk/core/module.py
+6
-2
configuration.py
src/binwalk/modules/configuration.py
+4
-7
zlibvalid.py
src/binwalk/plugins/zlibvalid.py
+1
-1
No files found.
src/binwalk/core/module.py
View file @
62b3345d
...
...
@@ -3,6 +3,7 @@ import os
import
sys
import
inspect
import
argparse
import
traceback
import
binwalk.core.common
import
binwalk.core.config
import
binwalk.core.plugin
...
...
@@ -279,9 +280,12 @@ class Module(object):
self
.
errors
.
append
(
e
)
if
e
.
exception
:
sys
.
stderr
.
write
(
e
.
module
.
__class__
.
__name__
+
" Exception: "
+
str
(
e
.
exception
)
+
"
\n
"
)
sys
.
stderr
.
write
(
"
\n
"
+
e
.
module
.
__class__
.
__name__
+
" Exception: "
+
str
(
e
.
exception
)
+
"
\n
"
)
sys
.
stderr
.
write
(
"-"
*
self
.
config
.
display
.
HEADER_WIDTH
+
"
\n
"
)
traceback
.
print_exc
(
file
=
sys
.
stderr
)
sys
.
stderr
.
write
(
"-"
*
self
.
config
.
display
.
HEADER_WIDTH
+
"
\n\n
"
)
elif
e
.
description
:
sys
.
stderr
.
write
(
e
.
module
.
__class__
.
__name__
+
" Error: "
+
e
.
description
+
"
\n
"
)
sys
.
stderr
.
write
(
"
\n
"
+
e
.
module
.
__class__
.
__name__
+
" Error: "
+
e
.
description
+
"
\n
\n
"
)
def
header
(
self
):
self
.
config
.
display
.
format_strings
(
self
.
HEADER_FORMAT
,
self
.
RESULT_FORMAT
)
...
...
src/binwalk/modules/configuration.py
View file @
62b3345d
...
...
@@ -54,9 +54,8 @@ class Configuration(Module):
description
=
'Supress output to stdout'
),
Option
(
long
=
'verbose'
,
short
=
'v'
,
type
=
list
,
kwargs
=
{
'verbose'
:
True
},
description
=
'Enable verbose output (specify twice for more verbosity)'
),
kwargs
=
{
'verbose'
:
1
},
description
=
'Enable verbose output'
),
Option
(
short
=
'h'
,
long
=
'help'
,
kwargs
=
{
'show_help'
:
True
},
...
...
@@ -76,7 +75,7 @@ class Configuration(Module):
Kwarg
(
name
=
'csv'
,
default
=
False
),
Kwarg
(
name
=
'format_to_terminal'
,
default
=
False
),
Kwarg
(
name
=
'quiet'
,
default
=
False
),
Kwarg
(
name
=
'verbose'
,
default
=
[]
),
Kwarg
(
name
=
'verbose'
,
default
=
0
),
Kwarg
(
name
=
'files'
,
default
=
[]),
Kwarg
(
name
=
'show_help'
,
default
=
False
),
]
...
...
@@ -84,8 +83,8 @@ class Configuration(Module):
def
load
(
self
):
self
.
target_files
=
[]
self
.
_set_verbosity
()
self
.
_open_target_files
()
self
.
_set_verbosity
()
self
.
settings
=
binwalk
.
core
.
config
.
Config
()
self
.
display
=
binwalk
.
core
.
display
.
Display
(
log
=
self
.
log_file
,
...
...
@@ -117,8 +116,6 @@ class Configuration(Module):
Sets the appropriate verbosity.
Must be called after self._test_target_files so that self.target_files is properly set.
'''
self
.
verbose
=
len
(
self
.
verbose
)
# If more than one target file was specified, enable verbose mode; else, there is
# nothing in some outputs to indicate which scan corresponds to which file.
if
len
(
self
.
target_files
)
>
1
and
self
.
verbose
==
0
:
...
...
src/binwalk/plugins/zlib.py
→
src/binwalk/plugins/zlib
valid
.py
View file @
62b3345d
...
...
@@ -2,7 +2,7 @@ import ctypes
import
ctypes.util
from
binwalk.core.common
import
BlockFile
class
Plugin
:
class
Plugin
(
object
)
:
'''
Searches for and validates zlib compressed data.
'''
...
...
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