Update the scanner interface to return all kind of objects.

This one's slightly contencious, in that scanner now don't all return a
uniform value, and therefore nothing can simply run through scanners.

Worst case scenario we make a separate stricter interface that says it
only returns offsets which will then allow things that need it to
dynamically find them, but it's probably too useful to be able to return
arbitrary objects of a type (as long as the objects returned are always
of that type).
This commit is contained in:
Mike Auty
2016-07-30 00:38:53 +01:00
parent 32b0b073ce
commit 8db3adae05
+1 -1
View File
@@ -55,7 +55,7 @@ class ScannerInterface(validity.ValidityRoutines, metaclass = ABCMeta):
@abstractmethod
def __call__(self, data, data_offset):
"""Searches through a chunk of data for a particular value/pattern/etc
Returns the ABSOLUTE offset (ie, offset_within_data + data_offset)
Always returns an iterator of the same type of object (need not be a volatility object)
data is the chunk of data to search through
data_offset is the offset within the layer that the data being searched starts at