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
325b4424
Commit
325b4424
authored
Dec 20, 2013
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated Modules to have a reset method for resetting dependency modules.
parent
d89eb06b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
module.py
src/binwalk/core/module.py
+11
-0
signature.py
src/binwalk/modules/signature.py
+1
-0
No files found.
src/binwalk/core/module.py
View file @
325b4424
...
...
@@ -170,6 +170,12 @@ class Module(object):
'''
return
None
def
reset
(
self
):
'''
Invoked only for dependency modules immediately prior to starting a new primary module.
'''
return
None
def
init
(
self
):
'''
Invoked prior to self.run.
...
...
@@ -313,6 +319,11 @@ class Module(object):
'''
self
.
status
=
status
# Reset all dependency modules
for
(
dependency
,
module
)
in
iterator
(
self
.
DEPENDS
):
if
hasattr
(
self
,
dependency
):
getattr
(
self
,
dependency
)
.
reset
()
try
:
self
.
init
()
except
KeyboardInterrupt
as
e
:
...
...
src/binwalk/modules/signature.py
View file @
325b4424
...
...
@@ -160,6 +160,7 @@ class Signature(Module):
self
.
footer
()
# Add any pending extracted files to the target_files list and reset the extractor's pending file list
target_files
=
[
self
.
config
.
open_file
(
f
)
for
f
in
self
.
extractor
.
pending
]
self
.
extractor
.
pending
=
[]
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