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
1afacda7
Commit
1afacda7
authored
Aug 25, 2014
by
devttys0
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #70 from LocutusOfBorg/master
Some typos fixed
parents
3121a3f5
9916b0e9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
parser.py
src/binwalk/core/parser.py
+7
-7
general.py
src/binwalk/modules/general.py
+1
-1
signature.py
src/binwalk/modules/signature.py
+1
-1
No files found.
src/binwalk/core/parser.py
View file @
1afacda7
...
...
@@ -263,9 +263,9 @@ class MagicParser(object):
# Default to little endian, unless the type field starts with 'be'.
# This assumes that we're running on a little endian system...
if
entry
.
type
.
startswith
(
'be'
):
endianess
=
self
.
BIG_ENDIAN
endian
n
ess
=
self
.
BIG_ENDIAN
else
:
endianess
=
self
.
LITTLE_ENDIAN
endian
n
ess
=
self
.
LITTLE_ENDIAN
# Try to convert the condition to an integer. This does not allow
# for more advanced conditions for the first line of a signature,
...
...
@@ -287,8 +287,8 @@ class MagicParser(object):
elif
'quad'
in
entry
.
type
:
entry
.
length
=
8
# Convert the integer value to a string of the appropriate endianess
entry
.
condition
=
self
.
_to_string
(
intval
,
entry
.
length
,
endianess
)
# Convert the integer value to a string of the appropriate endian
n
ess
entry
.
condition
=
self
.
_to_string
(
intval
,
entry
.
length
,
endian
n
ess
)
return
entry
...
...
@@ -332,13 +332,13 @@ class MagicParser(object):
return
candidate_offsets
def
_to_string
(
self
,
value
,
size
,
endianess
):
def
_to_string
(
self
,
value
,
size
,
endian
n
ess
):
'''
Converts an integer value into a raw string.
@value - The integer value to convert.
@size - Size, in bytes, of the integer value.
@endianess - One of self.LITTLE_ENDIAN | self.BIG_ENDIAN.
@endian
n
ess - One of self.LITTLE_ENDIAN | self.BIG_ENDIAN.
Returns a raw string containing value.
'''
...
...
@@ -347,7 +347,7 @@ class MagicParser(object):
for
i
in
range
(
0
,
size
):
data
+=
chr
((
value
>>
(
8
*
i
))
&
0xFF
)
if
endianess
!=
self
.
LITTLE_ENDIAN
:
if
endian
n
ess
!=
self
.
LITTLE_ENDIAN
:
data
=
data
[::
-
1
]
return
data
...
...
src/binwalk/modules/general.py
View file @
1afacda7
...
...
@@ -71,7 +71,7 @@ class General(Module):
Option
(
long
=
'quiet'
,
short
=
'q'
,
kwargs
=
{
'quiet'
:
True
},
description
=
'Supress output to stdout'
),
description
=
'Sup
p
ress output to stdout'
),
Option
(
long
=
'verbose'
,
short
=
'v'
,
kwargs
=
{
'verbose'
:
True
},
...
...
src/binwalk/modules/signature.py
View file @
1afacda7
...
...
@@ -27,7 +27,7 @@ class Signature(Module):
Option
(
short
=
'C'
,
long
=
'cast'
,
kwargs
=
{
'enabled'
:
True
,
'cast_data_types'
:
True
},
description
=
'Cast offsets as a given data type (use -y to specify the data type / endianess)'
),
description
=
'Cast offsets as a given data type (use -y to specify the data type / endian
n
ess)'
),
Option
(
short
=
'm'
,
long
=
'magic'
,
kwargs
=
{
'enabled'
:
True
,
'magic_files'
:
[]},
...
...
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