diff --git a/oletools/ppt_parser.py b/oletools/ppt_parser.py index 8c136ee..d9b4d1d 100644 --- a/oletools/ppt_parser.py +++ b/oletools/ppt_parser.py @@ -18,6 +18,7 @@ References: # TODO: # - make CurrentUserAtom and UserEditAtom PptTypes; adjust parse # - make stream optional in PptUnexpectedData +# - can speed-up by using less bigger struct.parse calls? # - license # - create a AtomBase class that defines check_value and parses RecordHead? # @@ -64,7 +65,21 @@ class PptUnexpectedData(Exception): super(PptUnexpectedData, self).__init__(self.msg) -# === STRUCTS ================================================================= +# === HELPERS ================================================================= + +def read_1(stream): + """ read 1 byte from stream """ + return struct.unpack('