MpjdZdZddlZddlZddlZej j ej jej je Z ej j ej je dZ e ej vrej jde ddlZddlmZddlmZdZdZd Zed k(reyy) 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) prettytablecB|y|jd}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 _/mnt/ssd/data/Dropbox/adrian/scripts/msg_venv/lib/python3.12/site-packages/oletools/oletimes.pydt2strr Vs% z  "B r7Nc tjgd}d|_d|_|j dt |j jt |j jf|jddD]^}|j tdj|t |j|t |j|f`t|y)N)zStream/Storage namezModification Timez Creation TimelRootT)streamsstorages/) r PrettyTablealign max_widthadd_rowr rootgetmtimegetctimelistdirreprjoinprint)oletobjs r process_oler"cs ]^AAGAKIIvvchh//12F388;L;L;N4OPQ{{4${7_ 4 &s||C/@(A6#,,WZJ[C\]^_ !Hr c2tdtztdtdd}tj|}|j dddd |j d d d ddd|j dddddd|j \}}t |dk(r3tt|jtjtj||j|j|jD]\}}}|r|j!dr|r|d|n|}tdtd|z|t#j$|}nt#j$|}t'||j)y)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 > LM @A TU BE  " " /F drTs j ''""277??277??83L#MNggrww||OTBC chhHHOOA{#%7  +Z zFr