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
8e52d4b1
Commit
8e52d4b1
authored
Dec 20, 2013
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract module creates separate output directories; fixed bug in BlockFile.seek
parent
cfedd0ff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
common.py
src/binwalk/common.py
+1
-1
module.py
src/binwalk/module.py
+0
-2
signature.py
src/binwalk/modules/signature.py
+3
-1
No files found.
src/binwalk/common.py
View file @
8e52d4b1
...
...
@@ -358,7 +358,7 @@ class BlockFile(io.FileIO):
def
seek
(
self
,
n
,
whence
=
os
.
SEEK_SET
):
if
whence
==
os
.
SEEK_SET
:
self
.
total_read
=
n
self
.
total_read
=
n
-
self
.
offset
elif
whence
==
os
.
SEEK_CUR
:
self
.
total_read
+=
n
elif
whence
==
os
.
SEEK_END
:
...
...
src/binwalk/module.py
View file @
8e52d4b1
...
...
@@ -462,14 +462,12 @@ class Modules(object):
def
load
(
self
,
module
):
kwargs
=
self
.
argv
(
module
,
argv
=
self
.
arguments
)
kwargs
.
update
(
self
.
dependencies
(
module
))
print
"Loading"
,
module
return
module
(
**
kwargs
)
def
dependencies
(
self
,
module
):
import
binwalk.modules
kwargs
=
{}
print
"Loading dependency:"
,
module
if
hasattr
(
module
,
"DEPENDS"
):
for
(
kwarg
,
dependency
)
in
iterator
(
module
.
DEPENDS
):
...
...
src/binwalk/modules/signature.py
View file @
8e52d4b1
...
...
@@ -112,13 +112,15 @@ class Signature(binwalk.module.Module):
r
.
valid
=
False
def
scan_file
(
self
,
fp
):
current_file_offset
=
0
while
True
:
(
data
,
dlen
)
=
fp
.
read_block
()
if
not
data
:
break
current_block_offset
=
0
block_start
=
fp
.
total_read
-
dlen
block_start
=
fp
.
offset
+
fp
.
total_read
-
dlen
self
.
status
.
completed
=
block_start
-
fp
.
offset
for
candidate_offset
in
self
.
parser
.
find_signature_candidates
(
data
,
dlen
):
...
...
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