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-depend
binwalk
Commits
37d5110c
Commit
37d5110c
authored
Sep 06, 2014
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved --disasm efficiency
parent
35538acb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
codeid.py
src/binwalk/modules/codeid.py
+1
-1
signature.py
src/binwalk/modules/signature.py
+5
-5
No files found.
src/binwalk/modules/codeid.py
View file @
37d5110c
...
...
@@ -19,7 +19,7 @@ class CodeID(Module):
Option
(
short
=
'Y'
,
long
=
'disasm'
,
kwargs
=
{
'enabled'
:
True
},
description
=
'Identify the architecture of
files containing executable code
'
),
description
=
'Identify the architecture of
excutable code using the capstone disassembler
'
),
Option
(
short
=
'T'
,
long
=
'minsn'
,
type
=
int
,
...
...
src/binwalk/modules/signature.py
View file @
37d5110c
...
...
@@ -23,7 +23,7 @@ class Signature(Module):
Option
(
short
=
'A'
,
long
=
'opcodes'
,
kwargs
=
{
'enabled'
:
True
,
'search_for_opcodes'
:
True
},
description
=
'Scan target file(s) for common executable opcodes'
),
description
=
'Scan target file(s) for common executable opcode
signature
s'
),
Option
(
short
=
'C'
,
long
=
'cast'
,
kwargs
=
{
'enabled'
:
True
,
'cast_data_types'
:
True
},
...
...
@@ -83,7 +83,7 @@ class Signature(Module):
binwalk
.
core
.
common
.
debug
(
"Loading magic files:
%
s"
%
str
(
self
.
magic_files
))
self
.
mfile
=
self
.
parser
.
parse
(
self
.
magic_files
)
self
.
magic
=
binwalk
.
core
.
magic
.
Magic
(
self
.
mfile
)
# Once the temporary magic files are loaded into libmagic, we don't need them anymore; delete the temp files
self
.
parser
.
rm_magic_files
()
...
...
@@ -129,7 +129,7 @@ class Signature(Module):
magic_result
=
self
.
magic
.
buffer
(
data
[
candidate_offset
:
candidate_offset
+
fp
.
block_peek_size
])
if
not
magic_result
:
continue
# The smart filter parser returns a binwalk.core.module.Result object
r
=
self
.
smart
.
parse
(
magic_result
)
...
...
@@ -138,11 +138,11 @@ class Signature(Module):
# Provide an instance of the current file object
r
.
file
=
fp
# Register the result for futher processing/display
# self.result automatically calls self.validate for result validation
self
.
result
(
r
=
r
)
# Is this a valid result and did it specify a jump-to-offset keyword?
if
r
.
valid
and
r
.
jump
>
0
:
absolute_jump_offset
=
r
.
offset
+
r
.
jump
...
...
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