
    Zi                        S r SrSSKrSSKrSSKr\R
                  R                  \R
                  R                  \R
                  R                  \	5      5      5      r
\R
                  R                  \R
                  R                  \
S5      5      r\\R
                  ;  a  \R
                  R                  S\5        SSKrSSKJr  SSKJr  SSKJr  S rS	 r\S
:X  a  \" 5         gg)aV  
olemeta.py

olemeta is a script to parse OLE files such as MS Office documents (e.g. Word,
Excel), to extract all standard properties present in the OLE file.

Usage: olemeta.py <file>

olemeta project website: http://www.decalage.info/python/olemeta

olemeta is part of the python-oletools package:
http://www.decalage.info/python/oletools
z0.54    Nz..)xglob)tablestream)ensure_stdout_handles_unicodec                    U R                  5       n[        5         [        S5        [        R                  " SS/SS/S9nUR
                   H&  n[        X5      nUc  M  UR                  X4/S S/S9  M(     UR                  5         [        S	5        [        S
5        [        R                  " SS/SS/S9nUR                   H&  n[        X5      nUc  M  UR                  X4/S S/S9  M(     UR                  5         g )Nz.Properties from the SummaryInformation stream:      PropertyValue)
header_rowyellow)colors z6Properties from the DocumentSummaryInformation stream:)
get_metadatar   printr   TableStreamSUMMARY_ATTRIBSgetattr	write_rowcloseDOCSUM_ATTRIBS)olemetatpropvalues        j/var/www/eduai.edurigo.com/question_generate/ques_gen_env/lib/python3.13/site-packages/oletools/olemeta.pyprocess_oler   W   s    D "# 

:;Rj'5JKA$$# KKtX.>K? % GGI	"I	
BCRj'5JKA### KKtX.>K? $ GGI    c            	      D   [        S[        -  5        [        S5        [        S5        Sn [        R                  " U S9nUR	                  SSSS	S
9  UR	                  SSSSS SS9  UR	                  SSSSSSS9  UR                  5       u  p#[        U5      S:X  a4  [        [        5        UR                  5         [        R                  " 5         [        R                  " X2R                  UR                  UR                  S9 H  u  pEnU(       a  UR!                  S5      (       a  M%  U(       a	  U< SU< 3OUn[        S5        [        SU-  5        Ub  ["        R$                  " U5      nO["        R$                  " U5      n['        U5        UR)                  5         M     g )Nz1olemeta %s - http://decalage.info/python/oletoolsz3THIS IS WORK IN PROGRESS - Check updates regularly!zGPlease report any issue at https://github.com/decalage2/oletools/issuesz3usage: olemeta [options] <filename> [filename2 ...])usagez-r
store_true	recursivez)find files recursively in subdirectories.)actiondesthelpz-zz--zipzip_passwordstrzhif the file is a zip archive, open all files from it, using the provided password (requires Python 2.6+))r$   typedefaultr%   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*   /z in zO===============================================================================z	FILE: %s
)r   __version__optparseOptionParser
add_option
parse_argslen__doc__
print_helpsysexitr   
iter_filesr"   r&   r*   endswitholefile	OleFileIOr   r   )	r    parseroptionsargs	containerfilenamedata	full_namer   s	            r   mainrB      s   	
=
KL	@A	TUAE""/F
d<kF  H
dG.ud F  G
dL{PS M  N '')OW 4yA~g
%*%5%5dFWFWCJCWCWcjctct&v!	T **3//:C(I6	hlY&'##D)C ##H-CC		!&vr   __main__)r3   r-   r5   osr.   pathnormpathabspathdirname__file___thismodule_dirjoin_parent_dirinsertr9   oletools.thirdpartyr   oletools.thirdparty.tablestreamr   oletools.common.io_encodingr   r   rB   __name__ r   r   <module>rS      s   h    ''""277??277??83L#MNggrww||OTBCchhHHOOA{#  % 7 E
(Z+Z zF r   