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
701da0f9
Commit
701da0f9
authored
Nov 12, 2018
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed one-of-many bug when scanning multiple files containing one-of-many signatures
parent
fd55d7f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
magic.py
src/binwalk/core/magic.py
+3
-0
signature.py
src/binwalk/modules/signature.py
+3
-0
No files found.
src/binwalk/core/magic.py
View file @
701da0f9
...
@@ -430,6 +430,9 @@ class Magic(object):
...
@@ -430,6 +430,9 @@ class Magic(object):
# Regex rule to find periods (see self._do_math)
# Regex rule to find periods (see self._do_math)
self
.
period
=
re
.
compile
(
"
\
."
)
self
.
period
=
re
.
compile
(
"
\
."
)
def
reset
(
self
):
self
.
display_once
=
set
()
def
_filtered
(
self
,
text
):
def
_filtered
(
self
,
text
):
'''
'''
Tests if a string should be filtered out or not.
Tests if a string should be filtered out or not.
...
...
src/binwalk/modules/signature.py
View file @
701da0f9
...
@@ -134,6 +134,9 @@ class Signature(Module):
...
@@ -134,6 +134,9 @@ class Signature(Module):
self
.
one_of_many
=
None
self
.
one_of_many
=
None
def
scan_file
(
self
,
fp
):
def
scan_file
(
self
,
fp
):
self
.
one_of_many
=
None
self
.
magic
.
reset
()
while
True
:
while
True
:
(
data
,
dlen
)
=
fp
.
read_block
()
(
data
,
dlen
)
=
fp
.
read_block
()
if
dlen
<
1
:
if
dlen
<
1
:
...
...
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