def __init__(self, fileObject, size, offset=None, whitelist=()):
"""
Default constructor which loads the raw data from a file.
No sanity check is performed on the size or existence of the file.
"""
# Common to MBR, VBR and IPL
self._suspiciousBehaviour = []
self._signature = []
self._codeHash = None
# MBR-specific
self._partTable = []
self._diskSignature = None
# VBR-specific
self._oemId = None
self._whitelist = whitelist
self._sample = fileObject.name
self._offset = offset
self._logger = logging.LoggerAdapter(logging.getLogger(__file__),
{'objectid': self._sample, 'stage': self._type})
self._raw = fileObject.read(size)
self._parse()
评论列表
文章目录