Commit 7d530ddb1251bcf1f5fc6b3f440ee37416df1afd

Authored by Philippe Lagadec
1 parent b984e77a

olevba: updated VBA_Parser docstring

Showing 1 changed file with 6 additions and 3 deletions
oletools/olevba.py
... ... @@ -1152,10 +1152,13 @@ class VBA_Parser(object):
1152 1152 """
1153 1153 Constructor for VBA_Parser
1154 1154  
1155   - :param _file: path of file to parse, file-like object or file content
1156   - :param filename: actual filename if _file is a file-like object or file content
1157   - in a bytes string
  1155 + :param filename: filename or path of file to parse, or file-like object
  1156 +
  1157 + :param data: None or bytes str, if None the file will be read from disk (or from the file-like object).
  1158 + If data is provided as a bytes string, it will be parsed as the content of the file in memory,
  1159 + and not read from disk. Note: files must be read in binary mode, i.e. open(f, 'rb').
1158 1160 """
  1161 + #TODO: filename should only be a string, data should be used for the file-like object
1159 1162 #TODO: filename should be mandatory, optional data is a string or file-like object
1160 1163 #TODO: also support olefile and zipfile as input
1161 1164 if data is None:
... ...