|idZdZddlZddlZddlZejejeje Z ejej e dZ e ejvrej de ddlZddlmZddlmZdZdZd Zed kr edSdS) ax oletimes.py oletimes is a script to parse OLE files such as MS Office documents (e.g. Word, Excel), to extract creation and modification times of all streams and storages in the OLE file. Usage: oletimes.py oletimes project website: http://www.decalage.info/python/oletimes oletimes is part of the python-oletools package: http://www.decalage.info/python/oletools z0.54Nz..)xglob) prettytablecT|dS|d}t|S)z Convert a datetime object to a string for display, without microseconds :param dt: datetime.datetime object, or None :return: str, or None Nr) microsecond)replacestr)dts ?C:\PYTHON\_runtimes\venv\Lib\site-packages\oletools/oletimes.pydt2strr Vs, zt  " "B r77Nc Ptjgd}d|_d|_|dt |jt |jf| ddD]z}|td |t ||t ||f{t|dS)N)zStream/Storage namezModification Timez Creation TimelRootT)streamsstorages/) r PrettyTablealign max_widthadd_rowr rootgetmtimegetctimelistdirreprjoinprint)oletobjs r process_oler"cs ] ] ]^^AAGAKIIvvch//1122F38;L;L;N;N4O4OPQQQ{{4${77__ 4 &&s||C/@/@(A(A6#,,WZJ[J[C\C\]^^^^ !HHHHHr ctdtztdtdd}tj|}|dddd |d d d ddd|dddddd|\}}t |dkr;tt|tj tj ||j |j|jD]\}}}|r|dr|r|d|n|}tdtd|z|t#j|}nt#j|}t'||dS)Nz2oletimes %s - http://decalage.info/python/oletoolsz3THIS IS WORK IN PROGRESS - Check updates regularly!zGPlease report any issue at https://github.com/decalage2/oletools/issuesz4usage: oletimes [options] [filename2 ...])usagez-r store_true recursivez)find files recursively in subdirectories.)actiondesthelpz-zz--zip zip_passwordrzhif the file is a zip archive, open all files from it, using the provided password (requires Python 2.6+))r(typedefaultr)z-fz --zipfname zip_fname*zoif the file is a zip archive, file(s) to be opened within the zip. Wildcards * and ? are supported. (default:*)r)r&r*r-rz in zO===============================================================================z FILE: %s )r __version__optparse OptionParser add_option parse_argslen__doc__ print_helpsysexitr iter_filesr&r*r-endswitholefile OleFileIOr"close) r$parseroptionsargs containerfilenamedata full_namers r mainrEos > LMMM @AAA TUUU BE  " / / /F drTs7  j '""27??27??83L3L#M#MNNgrw||OTBBCC chHOOA{###%%%%%%777777      +++Z zDFFFFFr