Commit 9916b0e9 by Gianfranco Costamagna

Some typos fixed

parent 27312e38
...@@ -263,9 +263,9 @@ class MagicParser(object): ...@@ -263,9 +263,9 @@ class MagicParser(object):
# Default to little endian, unless the type field starts with 'be'. # Default to little endian, unless the type field starts with 'be'.
# This assumes that we're running on a little endian system... # This assumes that we're running on a little endian system...
if entry.type.startswith('be'): if entry.type.startswith('be'):
endianess = self.BIG_ENDIAN endianness = self.BIG_ENDIAN
else: else:
endianess = self.LITTLE_ENDIAN endianness = self.LITTLE_ENDIAN
# Try to convert the condition to an integer. This does not allow # Try to convert the condition to an integer. This does not allow
# for more advanced conditions for the first line of a signature, # for more advanced conditions for the first line of a signature,
...@@ -287,8 +287,8 @@ class MagicParser(object): ...@@ -287,8 +287,8 @@ class MagicParser(object):
elif 'quad' in entry.type: elif 'quad' in entry.type:
entry.length = 8 entry.length = 8
# Convert the integer value to a string of the appropriate endianess # Convert the integer value to a string of the appropriate endianness
entry.condition = self._to_string(intval, entry.length, endianess) entry.condition = self._to_string(intval, entry.length, endianness)
return entry return entry
...@@ -332,13 +332,13 @@ class MagicParser(object): ...@@ -332,13 +332,13 @@ class MagicParser(object):
return candidate_offsets return candidate_offsets
def _to_string(self, value, size, endianess): def _to_string(self, value, size, endianness):
''' '''
Converts an integer value into a raw string. Converts an integer value into a raw string.
@value - The integer value to convert. @value - The integer value to convert.
@size - Size, in bytes, of the integer value. @size - Size, in bytes, of the integer value.
@endianess - One of self.LITTLE_ENDIAN | self.BIG_ENDIAN. @endianness - One of self.LITTLE_ENDIAN | self.BIG_ENDIAN.
Returns a raw string containing value. Returns a raw string containing value.
''' '''
...@@ -347,7 +347,7 @@ class MagicParser(object): ...@@ -347,7 +347,7 @@ class MagicParser(object):
for i in range(0, size): for i in range(0, size):
data += chr((value >> (8*i)) & 0xFF) data += chr((value >> (8*i)) & 0xFF)
if endianess != self.LITTLE_ENDIAN: if endianness != self.LITTLE_ENDIAN:
data = data[::-1] data = data[::-1]
return data return data
......
...@@ -71,7 +71,7 @@ class General(Module): ...@@ -71,7 +71,7 @@ class General(Module):
Option(long='quiet', Option(long='quiet',
short='q', short='q',
kwargs={'quiet' : True}, kwargs={'quiet' : True},
description='Supress output to stdout'), description='Suppress output to stdout'),
Option(long='verbose', Option(long='verbose',
short='v', short='v',
kwargs={'verbose' : True}, kwargs={'verbose' : True},
......
...@@ -27,7 +27,7 @@ class Signature(Module): ...@@ -27,7 +27,7 @@ class Signature(Module):
Option(short='C', Option(short='C',
long='cast', long='cast',
kwargs={'enabled' : True, 'cast_data_types' : True}, 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 / endianness)'),
Option(short='m', Option(short='m',
long='magic', long='magic',
kwargs={'enabled' : True, 'magic_files' : []}, kwargs={'enabled' : True, 'magic_files' : []},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment