bootcode_parser.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:bootcode_parser 作者: ANSSI-FR 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号