����JFIFXX�����    $.' ",#(7),01444'9=82<.342  2!!22222222222222222222222222222222222222222222222222����"��4�� ���,�PG"Z_�4�˷����kjز�Z�,F+��_z�,�© �����zh6�٨�ic�fu���#ډb���_�N�?��wQ���5-�~�I���8����TK<5o�Iv-�����k�_U_�����~b�M��d����Ӝ�U�Hh��?]��E�w��Q���k�{��_}qFW7HTՑ��Y��F�?_�'ϔ��_�Ջt��=||I ��6�έ"�����D���/[�k�9���Y�8ds|\���Ҿp6�Ҵ���]��.����6�z<�v��@]�i%��$j��~�g��J>��no����pM[me�i$[����s�o�ᘨ�˸ nɜG-�ĨU�ycP�3.DB�li�;��hj���x7Z^�N�h������N3u{�:j�x�힞��#M&��jL P@_���� P��&��o8������9�����@Sz6�t7#O�ߋ �s}Yf�T���lmr����Z)'N��k�۞p����w\�Tȯ?�8`�O��i{wﭹW�[�r�� ��Q4F�׊���3m&L�=��h3����z~��#�\�l :�F,j@�� ʱ�wQT����8�"kJO���6�֚l����}���R�>ډK���]��y����&����p�}b��;N�1�m�r$�|��7�>e�@B�TM*-iH��g�D�)� E�m�|�ؘbҗ�a��Ҿ����t4���o���G��*oCN�rP���Q��@z,|?W[0�����:�n,jWiE��W��$~/�hp\��?��{(�0���+�Y8rΟ�+����>S-S����VN;�}�s?.����� w�9��˟<���Mq4�Wv'��{)0�1mB��V����W[�����8�/<� �%���wT^�5���b��)iM� pg�N�&ݝ��VO~�q���u���9� ����!��J27����$O-���! �:�%H��� ـ����y�ΠM=t{!S�� oK8������t<����è:a������[�����ա�H���~��w��Qz`�po�^ ����Q��n� �,uu�C�$ ^���,������8�#��:�6��e�|~���!�3�3.�\0��q��o�4`.|� ����y�Q�`~;�d�ׯ,��O�Zw�������`73�v�܋�<���Ȏ�� ـ4k��5�K�a�u�=9Yd��$>x�A�&�� j0� ���vF��� Y�|�y��� ~�6�@c��1vOp�Ig����4��l�OD���L����� R���c���j�_�uX6��3?nk��Wy�f;^*B� ��@�~a�`��Eu������+���6�L��.ü>��}y���}_�O�6�͐�:�YrG�X��kG�����l^w���~㒶sy��Iu�!� W ��X��N�7BV��O��!X�2����wvG�R�f�T#�����t�/?���%8�^�W�aT��G�cL�M���I��(J����1~�8�?aT ���]����AS�E��(��*E}� 2��#I/�׍qz��^t�̔���b�Yz4x���t�){ OH��+(E��A&�N�������XT��o��"�XC��'���)}�J�z�p� ��~5�}�^����+�6����w��c��Q�|Lp�d�H��}�(�.|����k��c4^�"�����Z?ȕ ��a<�L�!039C� �Eu�C�F�Ew�ç ;�n?�*o���B�8�bʝ���'#Rqf���M}7����]����s2tcS{�\icTx;�\��7K���P���ʇ Z O-��~��c>"��?�������P��E��O�8��@�8��G��Q�g�a�Վ���󁶠�䧘��_%#r�>�1�z�a��eb��qcPѵ��n���#L��� =��׀t� L�7�`��V���A{�C:�g���e@�w1 Xp3�c3�ġ����p��M"'-�@n4���fG��B3�DJ�8[Jo�ߐ���gK)ƛ��$���� ���8�3�����+���� �����6�ʻ���� ���S�kI�*KZlT _`���?��K����QK�d����B`�s}�>���`��*�>��,*@J�d�oF*����弝��O}�k��s��]��y�ߘ��c1G�V���<=�7��7����6�q�PT��tXԀ�!9*4�4Tހ3XΛex�46���Y��D ����� �BdemDa����\�_l,��G�/���֌7���Y�](�xTt^%�GE�����4�}bT���ڹ�����;Y)���B�Q��u��>J/J �⮶.�XԄ��j�ݳ�+E��d ��r�5�_D�1 ��o�� �B�x�΢�#���<��W�����8���R6�@g�M�.��� dr�D��>(otU��@x=��~v���2� ӣ�d�oBd��3�eO�6�㣷�����ݜ6��6Y��Qz`��S��{���\P�~z m5{J/L��1������<�e�ͅPu�b�]�ϔ���'������f�b� Zpw��c`"��i���BD@:)ִ�:�]��hv�E�w���T�l��P���"Ju�}��وV J��G6��. J/�Qgl߭�e�����@�z�Zev2u�)]կ�����7x���s�M�-<ɯ�c��r�v�����@��$�ޮ}lk���a���'����>x��O\�ZFu>�����ck#��&:��`�$�ai�>2Δ����l���oF[h��lE�ܺ�Πk:)���`�� $[6�����9�����kOw�\|���8}������ބ:��񶐕��I�A1/�=�2[�,�!��.}gN#�u����b��� ~��݊��}34q����d�E��Lc��$��"�[q�U�硬g^��%B �z���r�pJ�ru%v\h1Y�ne`ǥ:g���pQM~�^�Xi� ��`S�:V29.�P���V�?B�k�� AEvw%�_�9C�Q����wKekPؠ�\�;Io d�{ ߞo�c1eP����\� `����E=���@K<�Y���eڼ�J���w����{av�F�'�M�@/J��+9p���|]�����Iw &`��8���&M�hg��[�{��Xj��%��Ӓ�$��(����ʹN���<>�I���RY���K2�NPlL�ɀ)��&e����B+ь����( � �JTx���_?EZ� }@ 6�U���뙢ط�z��dWI�n` D����噥�[��uV��"�G&Ú����2g�}&m��?ċ�"����Om#��������� ��{�ON��"S�X��Ne��ysQ���@Fn��Vg���dX�~nj�]J�<�K]:��FW��b�������62�=��5f����JKw��bf�X�55��~J �%^����:�-�QIE��P��v�nZum� z � ~ə ���� ���ة����;�f��\v���g�8�1��f24;�V���ǔ�)����9���1\��c��v�/'Ƞ�w�������$�4�R-��t���� e�6�/�ġ �̕Ecy�J���u�B���<�W�ַ~�w[B1L۲�-JS΂�{���΃������A��20�c#��@ 0!1@AP"#2Q`$3V�%45a6�FRUq��� ����^7ׅ,$n�������+��F�`��2X'��0vM��p�L=������5��8������u�p~���.�`r�����\���O��,ư�0oS ��_�M�����l���4�kv\JSd���x���SW�<��Ae�IX����������$I���w�:S���y���›R��9�Q[���,�5�;�@]�%���u�@ *ro�lbI �� ��+���%m:�͇ZV�����u�̉����θau<�fc�.����{�4Ա� �Q����*�Sm��8\ujqs]{kN���)qO�y�_*dJ�b�7���yQqI&9�ԌK!�M}�R�;������S�T���1���i[U�ɵz�]��U)V�S6���3$K{�ߊ<�(� E]Զ[ǼENg�����'�\?#)Dkf��J���o��v���'�%ƞ�&K�u�!��b�35LX�Ϸ��63$K�a�;�9>,R��W��3�3� d�JeTYE.Mϧ��-�o�j3+y��y^�c�������VO�9NV\nd�1 ��!͕_)a�v;����թ�M�lWR1��)El��P;��yوÏ�u 3�k�5Pr6<�⒲l�!˞*��u־�n�!�l:����UNW ��%��Chx8vL'��X�@��*��)���̮��ˍ��� ���D-M�+J�U�kvK����+�x8��cY������?�Ԡ��~3mo��|�u@[XeY�C�\Kp�x8�oC�C�&����N�~3-H���� ��MX�s�u<`���~"WL��$8ξ��3���a�)|:@�m�\���^�`�@ҷ)�5p+��6���p�%i)P M���ngc�����#0Aruz���RL+xSS?���ʮ}()#�t��mˇ!��0}}y����<�e� �-ή�Ԩ��X������ MF���ԙ~l L.3���}�V뽺�v�����멬��Nl�)�2����^�Iq��a��M��qG��T�����c3#������3U�Ǎ���}��לS�|qa��ڃ�+���-��2�f����/��bz��ڐ�� �ݼ[2�ç����k�X�2�* �Z�d���J�G����M*9W���s{��w���T��x��y,�in�O�v��]���n����P�$�JB@=4�OTI�n��e�22a\����q�d���%�$��(���:���: /*�K[PR�fr\nڙdN���F�n�$�4�[�� U�zƶ����� �mʋ���,�ao�u 3�z� �x��Kn����\[��VFmbE;�_U��&V�Gg�]L�۪&#n%�$ɯ�dG���D�TI=�%+AB�Ru#��b4�1�»x�cs�YzڙJG��f��Il��d�eF'T� iA��T���uC�$����Y��H?����[!G`}���ͪ� �纤Hv\������j�Ex�K���!���OiƸ�Yj�+u-<���'q����uN�*�r\��+�]���<�wOZ.fp�ێ��,-*)V?j-kÊ#�`�r��dV����(�ݽBk�����G�ƛk�QmUڗe��Z���f}|����8�8��a���i��3'J�����~G_�^���d�8w������ R�`(�~�.��u���l�s+g�bv���W���lGc}��u���afE~1�Ue������Z�0�8�=e�� f@/�jqEKQQ�J��oN��J���W5~M>$6�Lt�;$ʳ{���^��6�{����v6���ķܰg�V�cnn �~z�x�«�,2�u�?cE+Ș�H؎�%�Za�)���X>uW�Tz�Nyo����s���FQƤ��$��*�&�LLXL)�1�" L��eO��ɟ�9=���:t��Z���c��Ž���Y?�ӭV�wv�~,Y��r�ۗ�|�y��GaF�����C�����.�+� ���v1���fήJ�����]�S��T��B��n5sW}y�$��~z�'�c ��8 ��� ,! �p��VN�S��N�N�q��y8z˱�A��4��*��'������2n<�s���^ǧ˭P�Jޮɏ�U�G�L�J�*#��<�V��t7�8����TĜ>��i}K%,���)[��z�21z ?�N�i�n1?T�I�R#��m-�����������������1����lA�`��fT5+��ܐ�c�q՝��ʐ��,���3�f2U�եmab��#ŠdQ�y>\��)�SLY����w#��.���ʑ�f��� ,"+�w�~�N�'�c�O�3F�������N<���)j��&��,-� �љ���֊�_�zS���TǦ����w�>��?�������n��U仆�V���e�����0���$�C�d���rP �m�׈e�Xm�Vu� �L��.�bֹ��� �[Դaզ���*��\y�8�Է:�Ez\�0�Kq�C b��̘��cө���Q��=0Y��s�N��S.���3.���O�o:���#���v7�[#߫ ��5�܎�L���Er4���9n��COWlG�^��0k�%<���ZB���aB_���������'=��{i�v�l�$�uC���mƎҝ{�c㱼�y]���W�i ��ߧc��m�H� m�"�"�����;Y�ߝ�Z�Ǔ�����:S#��|}�y�,/k�Ld� TA�(�AI$+I3��;Y*���Z��}|��ӧO��d�v��..#:n��f>�>���ȶI�TX��� 8��y����"d�R�|�)0���=���n4��6ⲑ�+��r<�O�܂~zh�z����7ܓ�HH�Ga롏���nCo�>������a ���~]���R���̲c?�6(�q�;5%� |�uj�~z8R=X��I�V=�|{v�Gj\gc��q����z�؋%M�ߍ����1y��#��@f^���^�>N�����#x#۹��6�Y~�?�dfPO��{��P�4��V��u1E1J �*|���%���JN��`eWu�zk M6���q t[�� ��g�G���v��WIG��u_ft����5�j�"�Y�:T��ɐ���*�;� e5���4����q$C��2d�}���� _S�L#m�Yp��O�.�C�;��c����Hi#֩%+) �Ӎ��ƲV���SYź��g |���tj��3�8���r|���V��1#;.SQ�A[���S������#���`n�+���$��$I �P\[�@�s��(�ED�z���P��])8�G#��0B��[ى��X�II�q<��9�~[Z멜�Z�⊔IWU&A>�P~�#��dp<�?����7���c��'~���5 ��+$���lx@�M�dm��n<=e�dyX��?{�|Aef ,|n3�<~z�ƃ�uۧ�����P��Y,�ӥQ�*g�#먙R�\���;T��i,��[9Qi歉����c>]9�� ��"�c��P�� �Md?٥��If�ت�u��k��/����F��9�c*9��Ǎ:�ØF���z�n*�@|I�ށ9����N3{'��[�'ͬ�Ҳ4��#}��!�V� Fu��,�,mTIk���v C�7v���B�6k�T9��1�*l� '~��ƞF��lU��'�M ����][ΩũJ_�{�i�I�n��$���L�� j��O�dx�����kza۪��#�E��Cl����x˘�o�����V���ɞ�ljr��)�/,�߬h�L��#��^��L�ф�,íMƁe�̩�NB�L�����iL����q�}��(��q��6IçJ$�W�E$��:������=#����(�K�B����zђ <��K(�N�۫K�w��^O{!����)�H���>x�������lx�?>Պ�+�>�W���,Ly!_�D���Ō�l���Q�!�[ �S����J��1��Ɛ�Y}��b,+�Lo�x�ɓ)����=�y�oh�@�꥟/��I��ѭ=��P�y9��� �ۍYӘ�e+�p�Jnϱ?V\SO%�(�t� ���=?MR�[Ș�����d�/ ��n�l��B�7j� ��!�;ӥ�/�[-���A�>�dN�sLj ��,ɪv��=1c�.SQ�O3�U���ƀ�ܽ�E����������̻��9G�ϷD�7(�}��Ävӌ\�y�_0[w ���<΍>����a_��[0+�L��F.�޺��f�>oN�T����q;���y\��bՃ��y�jH�<|q-eɏ�_?_9+P���Hp$�����[ux�K w�Mw��N�ی'$Y2�=��q���KB��P��~������Yul:�[<����F1�2�O���5=d����]Y�sw:���Ϯ���E��j,_Q��X��z`H1,#II ��d�wr��P˂@�ZJV����y$�\y�{}��^~���[:N����ߌ�U�������O��d�����ؾe��${p>G��3c���Ė�lʌ�� ת��[��`ϱ�-W����dg�I��ig2��� ��}s ��ؤ(%#sS@���~���3�X�nRG�~\jc3�v��ӍL��M[JB�T��s3}��j�Nʖ��W����;7��ç?=X�F=-�=����q�ߚ���#���='�c��7���ڑW�I(O+=:uxq�������������e2�zi+�kuG�R��������0�&e�n���iT^J����~\jy���p'dtG��s����O��3����9* �b#Ɋ�� p������[Bws�T�>d4�ۧs���nv�n���U���_�~,�v����ƜJ1��s�� �QIz��)�(lv8M���U=�;����56��G���s#�K���MP�=��LvyGd��}�VwWBF�'�à �?MH�U�g2�� ����!�p�7Q��j��ڴ����=��j�u��� Jn�A s���uM������e��Ɔ�Ҕ�!)'��8Ϣ�ٔ��ޝ(��Vp���צ֖d=�IC�J�Ǡ{q������kԭ�߸���i��@K����u�|�p=..�*+����x�����z[Aqġ#s2a�Ɗ���RR�)*HRsi�~�a &f��M��P����-K�L@��Z��Xy�'x�{}��Zm+���:�)�) IJ�-i�u���� ���ܒH��'�L(7�y�GӜq���� j��� 6ߌg1�g�o���,kر���tY�?W,���p���e���f�OQS��!K�۟cҒA�|ս�j�>��=⬒��˧L[�� �߿2JaB~R��u�:��Q�] �0H~���]�7��Ƽ�I���(}��cq '�ήET���q�?f�ab���ӥvr� �)o��-Q��_'����ᴎo��K������;��V���o��%���~OK ����*��b�f:���-ťIR��`B�5!RB@���ï�� �u �̯e\�_U�_������� g�ES��3�������QT��a����x����U<~�c?�*�#]�MW,[8O�a�x��]�1bC|踤�P��lw5V%�)�{t�<��d��5���0i�XSU��m:��Z�┵�i�"��1�^B�-��P�hJ��&)O��*�D��c�W��vM��)����}���P��ܗ-q����\mmζZ-l@�}��a��E�6��F�@��&Sg@���ݚ�M����� ȹ 4����#p�\H����dYDo�H���"��\��..R�B�H�z_�/5˘����6��KhJR��P�mƶi�m���3�,#c�co��q�a)*Pt����R�m�k�7x�D�E�\Y�閣_X�<���~�)���c[[�BP����6�Yq���S��0����%_����;��Àv�~�| VS؇ ��'O0��F0��\���U�-�d@�����7�SJ*z��3n��y��P����O���������m�~�P�3|Y��ʉr#�C�<�G~�.,! ���bqx���h~0=��!ǫ�jy����l�O,�[B��~��|9��ٱ����Xly�#�i�B��g%�S��������tˋ���e���ې��\[d�t)��.+u�|1 ������#�~Oj����hS�%��i.�~X���I�H�m��0n���c�1uE�q��cF�RF�o���7� �O�ꮧ� ���ۛ{��ʛi5�rw?׌#Qn�TW��~?y$��m\�\o����%W� ?=>S�N@�� �Ʈ���R����N�)�r"C�:��:����� �����#��qb��Y�. �6[��2K����2u�Ǧ�HYR��Q�MV��� �G�$��Q+.>�����nNH��q�^��� ����q��mM��V��D�+�-�#*�U�̒ ���p욳��u:�������IB���m���PV@O���r[b= �� ��1U�E��_Nm�yKbN�O���U�}�the�`�|6֮P>�\2�P�V���I�D�i�P�O;�9�r�mAHG�W�S]��J*�_�G��+kP�2����Ka�Z���H�'K�x�W�MZ%�O�YD�Rc+o��?�q��Ghm��d�S�oh�\�D�|:W������UA�Qc yT�q������~^�H��/��#p�CZ���T�I�1�ӏT����4��"�ČZ�����}��`w�#�*,ʹ�� ��0�i��課�Om�*�da��^gJ݅{���l�e9uF#T�ֲ��̲�ٞC"�q���ߍ ոޑ�o#�XZTp����@ o�8��(jd��xw�]�,f���`~�|,s��^����f�1���t��|��m�򸄭/ctr��5s��7�9Q�4�H1꠲BB@l9@���C�����+�wp�xu�£Yc�9��?`@#�o�mH�s2��)�=��2�.�l����jg�9$�Y�S�%*L������R�Y������7Z���,*=�䷘$�������arm�o�ϰ���UW.|�r�uf����IGw�t����Zwo��~5 ��YյhO+=8fF�)�W�7�L9lM�̘·Y���֘YLf�큹�pRF���99.A �"wz��=E\Z���'a� 2��Ǚ�#;�'}�G���*��l��^"q��+2FQ� hj��kŦ��${���ޮ-�T�٭cf�|�3#~�RJ����t��$b�(R��(����r���dx� >U b�&9,>���%E\� Ά�e�$��'�q't��*�א���ެ�b��-|d���SB�O�O��$�R+�H�)�܎�K��1m`;�J�2�Y~9��O�g8=vqD`K[�F)k�[���1m޼c��n���]s�k�z$@��)!I �x՝"v��9=�ZA=`Ɠi �:�E��)`7��vI��}d�YI�_ �o�:ob���o ���3Q��&D&�2=�� �Ά��;>�h����y.*ⅥS������Ӭ�+q&����j|UƧ����}���J0��WW< ۋS�)jQR�j���Ư��rN)�Gű�4Ѷ(�S)Ǣ�8��i��W52���No˓� ۍ%�5brOn�L�;�n��\G����=�^U�dI���8$�&���h��'���+�(������cȁ߫k�l��S^���cƗjԌE�ꭔ��gF���Ȓ��@���}O���*;e�v�WV���YJ\�]X'5��ղ�k�F��b 6R�o՜m��i N�i����>J����?��lPm�U��}>_Z&�KK��q�r��I�D�Չ~�q�3fL�:S�e>���E���-G���{L�6p�e,8��������QI��h��a�Xa��U�A'���ʂ���s�+טIjP�-��y�8ۈZ?J$��W�P� ��R�s�]��|�l(�ԓ��sƊi��o(��S0��Y� 8�T97.�����WiL��c�~�dxc�E|�2!�X�K�Ƙਫ਼�$((�6�~|d9u+�qd�^3�89��Y�6L�.I�����?���iI�q���9�)O/뚅����O���X��X�V��ZF[�یgQ�L��K1���RҖr@v�#��X�l��F���Нy�S�8�7�kF!A��sM���^rkp�jP�DyS$N���q��nxҍ!U�f�!eh�i�2�m���`�Y�I�9r�6� �TF���C}/�y�^���Η���5d�'��9A-��J��>{�_l+�`��A���[�'��յ�ϛ#w:݅�%��X�}�&�PSt�Q�"�-��\縵�/����$Ɨh�Xb�*�y��BS����;W�ջ_mc�����vt?2}1�;qS�d�d~u:2k5�2�R�~�z+|HE!)�Ǟl��7`��0�<�,�2*���Hl-��x�^����'_TV�gZA�'j� ^�2Ϊ��N7t�����?w�� �x1��f��Iz�C-Ȗ��K�^q�;���-W�DvT�7��8�Z�������� hK�(P:��Q- �8�n�Z���܃e貾�<�1�YT<�,�����"�6{/ �?�͟��|1�:�#g��W�>$����d��J��d�B��=��jf[��%rE^��il:��B���x���Sּ�1հ��,�=��*�7 fcG��#q� �eh?��2�7�����,�!7x��6�n�LC�4x��},Geǝ�tC.��vS �F�43��zz\��;QYC,6����~;RYS/6���|2���5���v��T��i����������mlv��������&� �nRh^ejR�LG�f���? �ۉҬܦƩ��|��Ȱ����>3����!v��i�ʯ�>�v��オ�X3e���_1z�Kȗ\<������!�8���V��]��?b�k41�Re��T�q��mz��TiOʦ�Z��Xq���L������q"+���2ۨ��8}�&N7XU7Ap�d�X��~�׿��&4e�o�F��� �H����O���č�c�� 懴�6���͉��+)��v;j��ݷ�� �UV�� i��� j���Y9GdÒJ1��詞�����V?h��l����l�cGs�ځ�������y�Ac�����\V3�? �� ܙg�>qH�S,�E�W�[�㺨�uch�⍸�O�}���a��>�q�6�n6����N6�q������N ! 1AQaq�0@����"2BRb�#Pr���3C`��Scst���$4D���%Td�� ?���N����a��3��m���C���w��������xA�m�q�m���m������$����4n淿t'��C"w��zU=D�\R+w�p+Y�T�&�պ@��ƃ��3ޯ?�Aﶂ��aŘ���@-�����Q�=���9D��ռ�ѻ@��M�V��P��܅�G5�f�Y<�u=,EC)�<�Fy'�"�&�չ�X~f��l�KԆV��?�� �W�N����=(� �;���{�r����ٌ�Y���h{�١������jW����P���Tc�����X�K�r��}���w�R��%��?���E��m�� �Y�q|����\lEE4���r���}�lsI�Y������f�$�=�d�yO����p�����yBj8jU�o�/�S��?�U��*������ˍ�0������u�q�m [�?f����a�� )Q�>����6#������� ?����0UQ����,IX���(6ڵ[�DI�MNލ�c&���υ�j\��X�R|,4��� j������T�hA�e��^���d���b<����n�� �즇�=!���3�^�`j�h�ȓr��jẕ�c�,ٞX����-����a�ﶔ���#�$��]w�O��Ӫ�1y%��L�Y<�wg#�ǝ�̗`�x�xa�t�w��»1���o7o5��>�m뭛C���Uƃߜ}�C���y1Xνm�F8�jI���]����H���ۺиE@I�i;r�8ӭ����V�F�Շ| ��&?�3|x�B�MuS�Ge�=Ӕ�#BE5G�����Y!z��_e��q�р/W>|-�Ci߇�t�1ޯќd�R3�u��g�=0 5��[?�#͏��q�cf���H��{ ?u�=?�?ǯ���}Z��z���hmΔ�BFTW�����<�q�(v� ��!��z���iW]*�J�V�z��gX֧A�q�&��/w���u�gYӘa���; �i=����g:��?2�dž6�ى�k�4�>�Pxs����}������G�9��3 ���)gG�R<>r h�$��'nc�h�P��Bj��J�ҧH� -��N1���N��?��~��}-q!=��_2hc�M��l�vY%UE�@|�v����M2�.Y[|y�"Eï��K�ZF,�ɯ?,q�?v�M 80jx�"�;�9vk�����+ ֧�� �ȺU��?�%�vcV��mA�6��Qg^M����A}�3�nl� QRN�l8�kkn�'�����(��M�7m9و�q���%ޟ���*h$Zk"��$�9��: �?U8�Sl��,,|ɒ��xH(ѷ����Gn�/Q�4�P��G�%��Ա8�N��!� �&�7�;���eKM7�4��9R/%����l�c>�x;������>��C�:�����t��h?aKX�bhe�ᜋ^�$�Iհ �hr7%F$�E��Fd���t��5���+�(M6�t����Ü�UU|zW�=a�Ts�Tg������dqP�Q����b'�m���1{|Y����X�N��b �P~��F^F:����k6�"�j!�� �I�r�`��1&�-$�Bevk:y���#yw��I0��x��=D�4��tU���P�ZH��ڠ底taP��6����b>�xa����Q�#� WeF��ŮNj�p�J* mQ�N����*I�-*�ȩ�F�g�3 �5��V�ʊ�ɮ�a��5F���O@{���NX��?����H�]3��1�Ri_u��������ѕ�� ����0��� F��~��:60�p�͈�S��qX#a�5>���`�o&+�<2�D����: �������ڝ�$�nP���*)�N�|y�Ej�F�5ټ�e���ihy�Z �>���k�bH�a�v��h�-#���!�Po=@k̆IEN��@��}Ll?j�O������߭�ʞ���Q|A07x���wt!xf���I2?Z��<ץ�T���cU�j��]��陎Ltl �}5�ϓ��$�,��O�mˊ�;�@O��jE��j(�ا,��LX���LO���Ц�90�O �.����a��nA���7������j4 ��W��_ٓ���zW�jcB������y՗+EM�)d���N�g6�y1_x��p�$Lv:��9�"z��p���ʙ$��^��JԼ*�ϭ����o���=x�Lj�6�J��u82�A�H�3$�ٕ@�=Vv�]�'�qEz�;I˼��)��=��ɯ���x �/�W(V���p�����$ �m�������u�����񶤑Oqˎ�T����r��㠚x�sr�GC��byp�G��1ߠ�w e�8�$⿄����/�M{*}��W�]˷.�CK\�ުx���/$�WPw���r� |i���&�}�{�X� �>��$-��l���?-z���g����lΆ���(F���h�vS*���b���߲ڡn,|)mrH[���a�3�ר�[1��3o_�U�3�TC�$��(�=�)0�kgP���� ��u�^=��4 �WYCҸ:��vQ�ר�X�à��tk�m,�t*��^�,�}D*� �"(�I��9R����>`�`��[~Q]�#af��i6l��8���6�:,s�s�N6�j"�A4���IuQ��6E,�GnH��zS�HO�uk�5$�I�4��ؤ�Q9�@��C����wp�BGv[]�u�Ov���0I4���\��y�����Q�Ѹ��~>Z��8�T��a��q�ޣ;z��a���/��S��I:�ܫ_�|������>=Z����8:�S��U�I�J��"IY���8%b8���H��:�QO�6�;7�I�S��J��ҌAά3��>c���E+&jf$eC+�z�;��V����� �r���ʺ������my�e���aQ�f&��6�ND��.:��NT�vm�<- u���ǝ\MvZY�N�NT��-A�>jr!S��n�O 1�3�Ns�%�3D@���`������ܟ 1�^c<���� �a�ɽ�̲�Xë#�w�|y�cW�=�9I*H8�p�^(4���՗�k��arOcW�tO�\�ƍR��8����'�K���I�Q�����?5�>[�}��yU�ײ -h��=��% q�ThG�2�)���"ו3]�!kB��*p�FDl�A���,�eEi�H�f�Ps�����5�H:�Փ~�H�0Dت�D�I����h�F3�������c��2���E��9�H��5�zԑ�ʚ�i�X�=:m�xg�hd(�v����׊�9iS��O��d@0ڽ���:�p�5�h-��t�&���X�q�ӕ,��ie�|���7A�2���O%P��E��htj��Y1��w�Ѓ!����  ���� ࢽ��My�7�\�a�@�ţ�J �4�Ȼ�F�@o�̒?4�wx��)��]�P��~�����u�����5�����7X ��9��^ܩ�U;Iꭆ 5 �������eK2�7(�{|��Y׎ �V��\"���Z�1� Z�����}��(�Ǝ"�1S���_�vE30>���p;� ΝD��%x�W�?W?v����o�^V�i�d��r[��/&>�~`�9Wh��y�;���R��� ;;ɮT��?����r$�g1�K����A��C��c��K��l:�'��3 c�ﳯ*"t8�~l��)���m��+U,z��`(�>yJ�?����h>��]��v��ЍG*�{`��;y]��I�T� ;c��NU�fo¾h���/$���|NS���1�S�"�H��V���T���4��uhǜ�]�v;���5�͠x��'C\�SBpl���h}�N����� A�Bx���%��ޭ�l��/����T��w�ʽ]D�=����K���ž�r㻠l4�S�O?=�k �M:� ��c�C�a�#ha���)�ѐxc�s���gP�iG��{+���x���Q���I= �� z��ԫ+ �8"�k�ñ�j=|����c ��y��CF��/��*9ж�h{ �?4�o� ��k�m�Q�N�x��;�Y��4膚�a�w?�6�>e]�����Q�r�:����g�,i"�����ԩA�*M�<�G��b�if��l^M��5� �Ҩ�{����6J��ZJ�����P�*�����Y���ݛu�_4�9�I8�7���������,^ToR���m4�H��?�N�S�ѕw��/S��甍�@�9H�S�T��t�ƻ���ʒU��*{Xs�@����f�����֒Li�K{H�w^���������Ϥm�tq���s� ���ք��f:��o~s��g�r��ט� �S�ѱC�e]�x���a��) ���(b-$(�j>�7q�B?ӕ�F��hV25r[7 Y� }L�R��}����*sg+��x�r�2�U=�*'WS��ZDW]�WǞ�<��叓���{�$�9Ou4��y�90-�1�'*D`�c�^o?(�9��u���ݐ��'PI&� f�Jݮ�������:wS����jfP1F:X �H�9dԯ���˝[�_54 �}*;@�ܨ�� ð�yn�T���?�ןd�#���4rG�ͨ��H�1�|-#���Mr�S3��G�3�����)�.᧏3v�z֑��r����$G"�`j �1t��x0<Ɔ�Wh6�y�6��,œ�Ga��gA����y��b��)��h�D��ß�_�m��ü �gG;��e�v��ݝ�nQ� ��C����-�*��o���y�a��M��I�>�<���]obD��"�:���G�A��-\%LT�8���c�)��+y76���o�Q�#*{�(F�⽕�y����=���rW�\p���۩�c���A���^e6��K������ʐ�cVf5$�'->���ՉN"���F�"�UQ@�f��Gb~��#�&�M=��8�ט�JNu9��D��[̤�s�o�~������ G��9T�tW^g5y$b��Y'��س�Ǵ�=��U-2 #�MC�t(�i� �lj�@Q 5�̣i�*�O����s�x�K�f��}\��M{E�V�{�υ��Ƈ�����);�H����I��fe�Lȣr�2��>��W�I�Ȃ6������i��k�� �5�YOxȺ����>��Y�f5'��|��H+��98pj�n�.O�y�������jY��~��i�w'������l�;�s�2��Y��:'lg�ꥴ)o#'Sa�a�K��Z� �m��}�`169�n���"���x��I ��*+� }F<��cГ���F�P�������ֹ*�PqX�x۩��,� ��N�� �4<-����%����:��7����W���u�`����� $�?�I��&����o��o��`v�>��P��"��l���4��5'�Z�gE���8���?��[�X�7(��.Q�-��*���ތL@̲����v��.5���[��=�t\+�CNܛ��,g�SQnH����}*F�G16���&:�t��4ُ"A��̣��$�b �|����#rs��a�����T�� ]�<�j��BS�('$�ɻ� �wP;�/�n��?�ݜ��x�F��yUn�~mL*-�������Xf�wd^�a�}��f�,=t�׵i�.2/wpN�Ep8�OР���•��R�FJ� 55TZ��T �ɭ�<��]��/�0�r�@�f��V��V����Nz�G��^���7hZi����k��3�,kN�e|�vg�1{9]_i��X5y7� 8e]�U����'�-2,���e"����]ot�I��Y_��n�(JҼ��1�O ]bXc���Nu�No��pS���Q_���_�?i�~�x h5d'�(qw52] ��'ޤ�q��o1�R!���`ywy�A4u���h<קy���\[~�4�\ X�Wt/� 6�����n�F�a8��f���z �3$�t(���q��q�x��^�XWeN'p<-v�!�{�(>ӽDP7��ո0�y)�e$ٕv�Ih'Q�EA�m*�H��RI��=:��� ���4牢) �%_iN�ݧ�l]� �Nt���G��H�L��� ɱ�g<���1V�,�J~�ٹ�"K��Q�� 9�HS�9�?@��k����r�;we݁�]I�!{ �@�G�[�"��`���J:�n]�{�cA�E����V��ʆ���#��U9�6����j�#Y�m\��q�e4h�B�7��C�������d<�?J����1g:ٳ���=Y���D�p�ц� ׈ǔ��1�]26؜oS�'��9�V�FVu�P�h�9�xc�oq�X��p�o�5��Ա5$�9W�V(�[Ak�aY錎qf;�'�[�|���b�6�Ck��)��#a#a˙��8���=äh�4��2��C��4tm^ �n'c���]GQ$[Wҿ��i���vN�{Fu ��1�gx��1┷���N�m��{j-,��x�� Ūm�ЧS�[�s���Gna���䑴�� x�p 8<������97�Q���ϴ�v�aϚG��Rt�Һ׈�f^\r��WH�JU�7Z���y)�vg=����n��4�_)y��D'y�6�]�c�5̪�\� �PF�k����&�c;��cq�$~T�7j ���nç]�<�g ":�to�t}�159�<�/�8������m�b�K#g'I'.W�����6��I/��>v��\�MN��g���m�A�yQL�4u�Lj�j9��#44�t��l^�}L����n��R��!��t��±]��r��h6ٍ>�yҏ�N��fU�� ���� Fm@�8}�/u��jb9������he:A�y�ծw��GpΧh�5����l}�3p468��)U��d��c����;Us/�֔�YX�1�O2��uq�s��`hwg�r~�{ R��mhN��؎*q 42�*th��>�#���E����#��Hv�O����q�}�����6�e��\�,Wk�#���X��b>��p}�դ��3���T5��†��6��[��@�P�y*n��|'f�֧>�lư΂�̺����SU�'*�q�p�_S�����M�� '��c�6�����m�� ySʨ;M��r���Ƌ�m�Kxo,���Gm�P��A�G�:��i��w�9�}M(�^�V��$ǒ�ѽ�9���|���� �a����J�SQ�a���r�B;����}���ٻ֢�2�%U���c�#�g���N�a�ݕ�'�v�[�OY'��3L�3�;,p�]@�S��{ls��X�'���c�jw�k'a�.��}�}&�� �dP�*�bK=ɍ!����;3n�gΊU�ߴmt�'*{,=SzfD� A��ko~�G�aoq�_mi}#�m�������P�Xhύ����mxǍ�΂���巿zf��Q���c���|kc�����?���W��Y�$���_Lv����l߶��c���`?����l�j�ݲˏ!V��6����U�Ђ(A���4y)H���p�Z_�x��>���e��R��$�/�`^'3qˏ�-&Q�=?��CFVR �D�fV�9��{�8g�������n�h�(P"��6�[�D���< E�����~0<@�`�G�6����Hг�cc�� �c�K.5��D��d�B���`?�XQ��2��ٿyqo&+�1^� DW�0�ꊩ���G�#��Q�nL3��c���������/��x ��1�1[y�x�პCW��C�c�UĨ80�m�e�4.{�m��u���I=��f�����0QRls9���f���������9���~f�����Ǩ��a�"@�8���ȁ�Q����#c�ic������G��$���G���r/$W�(��W���V�"��m�7�[m�A�m����bo��D� j����۳� l���^�k�h׽����� ��#� iXn�v��eT�k�a�^Y�4�BN��ĕ��0 !01@Q"2AaPq3BR������?���@4�Q�����T3,���㺠�W�[=JK�Ϟ���2�r^7��vc�:�9 �E�ߴ�w�S#d���Ix��u��:��Hp��9E!�� V 2;73|F��9Y���*ʬ�F��D����u&���y؟��^EA��A��(ɩ���^��GV:ݜDy�`��Jr29ܾ�㝉��[���E;Fzx��YG��U�e�Y�C���� ����v-tx����I�sם�Ę�q��Eb�+P\ :>�i�C'�;�����k|z�رn�y]�#ǿb��Q��������w�����(�r|ӹs��[�D��2v-%��@;�8<a���[\o[ϧw��I!��*0�krs)�[�J9^��ʜ��p1)� "��/_>��o��<1����A�E�y^�C��`�x1'ܣn�p��s`l���fQ��):�l����b>�Me�jH^?�kl3(�z:���1ŠK&?Q�~�{�ٺ�h�y���/�[��V�|6��}�KbX����mn[-��7�5q�94�������dm���c^���h� X��5��<�eޘ>G���-�}�دB�ޟ� ��|�rt�M��V+�]�c?�-#ڛ��^ǂ}���Lkr���O��u�>�-D�ry� D?:ޞ�U��ǜ�7�V��?瓮�"�#���r��չģVR;�n���/_� ؉v�ݶe5d�b9��/O��009�G���5n�W����JpA�*�r9�>�1��.[t���s�F���nQ� V 77R�]�ɫ8����_0<՜�IF�u(v��4��F�k�3��E)��N:��yڮe��P�`�1}�$WS��J�SQ�N�j�ٺ��޵�#l���ј(�5=��5�lǏmoW�v-�1����v,W�mn��߀$x�<����v�j(����c]��@#��1������Ǔ���o'��u+����;G�#�޸��v-lη��/(`i⣍Pm^���ԯ̾9Z��F��������n��1��� ��]�[��)�'������:�֪�W��FC����� �B9،!?���]��V��A�Վ�M��b�w��G F>_DȬ0¤�#�QR�[V��kz���m�w�"��9ZG�7'[��=�Q����j8R?�zf�\a�=��O�U����*oB�A�|G���2�54 �p��.w7� �� ��&������ξxGHp� B%��$g�����t�Џ򤵍z���HN�u�Я�-�'4��0��;_��3 !01"@AQa2Pq#3BR������?��ʩca��en��^��8���<�u#��m*08r��y�N"�<�Ѳ0��@\�p��� �����Kv�D��J8�Fҽ� �f�Y��-m�ybX�NP����}�!*8t(�OqѢ��Q�wW�K��ZD��Δ^e��!� ��B�K��p~�����e*l}z#9ң�k���q#�Ft�o��S�R����-�w�!�S���Ӥß|M�l޶V��!eˈ�8Y���c�ЮM2��tk���� ������J�fS����Ö*i/2�����n]�k�\���|4yX�8��U�P.���Ы[���l��@"�t�<������5�lF���vU�����W��W��;�b�cД^6[#7@vU�xgZv��F�6��Q,K�v��� �+Ъ��n��Ǣ��Ft���8��0��c�@�!�Zq s�v�t�;#](B��-�nῃ~���3g������5�J�%���O������n�kB�ĺ�.r��+���#�N$?�q�/�s�6��p��a����a��J/��M�8��6�ܰ"�*������ɗud"\w���aT(����[��F��U՛����RT�b���n�*��6���O��SJ�.�ij<�v�MT��R\c��5l�sZB>F��<7�;EA��{��E���Ö��1U/�#��d1�a�n.1ě����0�ʾR�h��|�R��Ao�3�m3 ��%�� ���28Q� ��y��φ���H�To�7�lW>����#i`�q���c����a��� �m,B�-j����݋�'mR1Ήt�>��V��p���s�0IbI�C.���1R�ea�����]H�6����������4B>��o��](��$B���m�����a�!=��?�B� K�Ǿ+�Ծ"�n���K��*��+��[T#�{E�J�S����Q�����s�5�:�U�\wĐ�f�3����܆&�)����I���Ԇw��E T�lrTf6Q|R�h:��[K�� �z��c֧�G�C��%\��_�a�84��HcO�bi��ؖV��7H �)*ģK~Xhչ0��4?�0��� �E<���}3���#���u�?�� ��|g�S�6ꊤ�|�I#Hڛ� �ա��w�X��9��7���Ŀ%�SL��y6č��|�F�a 8���b��$�sק�h���b9RAu7�˨p�Č�_\*w��묦��F ����4D~�f����|(�"m���NK��i�S�>�$d7SlA��/�²����SL��|6N�}���S�˯���g��]6��; �#�.��<���q'Q�1|KQ$�����񛩶"�$r�b:���N8�w@��8$�� �AjfG|~�9F ���Y��ʺ��Bwؒ������M:I岎�G��`s�YV5����6��A �b:�W���G�q%l�����F��H���7�������Fsv7��k�� 403WebShell
403Webshell
Server IP : 172.67.215.126  /  Your IP : 172.69.58.38
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ip-172-31-19-221 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.1.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/olefile/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/olefile/__pycache__/olefile.cpython-310.pyc
o

6��[_��@s�dZddlmZdZdZdZgd�ZddlZddlZddl	Z	ddl
Z
ddlZddl
Z
ddlZeeur4eZzeZWneZYe
�
d�jd	krJdZne
�
d
�jd	krUd
Zne
�
d�jd	kr`dZned��zeWneyseZYnwd
Zejddkr�dZndZejdfdd�Zed�Z dd�Z!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)dZ*dZ+dZ,dZ-d	Z.dZ/dZ0dZ1dZ2dZ3dZ4d	Z5dZ6dZ7d Z8d!Z9d"Z:d#Z;d$Z<d%Z=d&Z>d'Z?d(Z@d)ZAd*ZBd+ZCd,ZDd-ZEd.ZFd/ZGd0ZHd1ZId2ZJd3ZKd4ZLd5ZMd6ZNd7ZOd8ZPd9ZQd:ZRd;ZSd<ZTd=ZUd>ZVd?ZWd@ZXdAZYdBZZd#Z[d,Z\d6Z]dCZ^dDZ_dEdF�Z`eeu�rdGdH�ZandIdH�Zad]dJdK�Zbd]dLdM�ZcdNdO�ZddPdQ�ZeGdRdS�dS�ZfGdTdU�dUejg�ZhGdVdW�dW�ZiGdXdY�dY�ZjdZd[�Zkeld\k�r_ek�dSdS)^a:
olefile (formerly OleFileIO_PL)

Module to read/write Microsoft OLE2 files (also called Structured Storage or
Microsoft Compound Document File Format), such as Microsoft Office 97-2003
documents, Image Composer and FlashPix files, Outlook messages, ...
This version is compatible with Python 2.7 and 3.4+

Project website: https://www.decalage.info/olefile

olefile is copyright (c) 2005-2018 Philippe Lagadec
(https://www.decalage.info)

olefile is based on the OleFileIO module from the PIL library v1.1.7
See: http://www.pythonware.com/products/pil/index.htm
and http://svn.effbot.org/public/tags/pil-1.1.7/PIL/OleFileIO.py

The Python Imaging Library (PIL) is
Copyright (c) 1997-2009 by Secret Labs AB
Copyright (c) 1995-2009 by Fredrik Lundh

See source code and LICENSE.txt for information on usage and redistribution.
�)�print_functionz
2018-09-09z0.46zPhilippe Lagadec)�	isOleFile�	OleFileIO�OleMetadata�enable_logging�MAGIC�STGTY_EMPTY�KEEP_UNICODE_NAMES�STGTY_STREAM�
STGTY_STORAGE�
STGTY_ROOT�STGTY_PROPERTY�STGTY_LOCKBYTES�MINIMAL_OLEFILE_SIZE�
DEFECT_UNSURE�DEFECT_POTENTIAL�DEFECT_INCORRECT�DEFECT_FATAL�DEFAULT_PATH_ENCODING�
MAXREGSECT�DIFSECT�FATSECT�
ENDOFCHAIN�FREESECT�	MAXREGSID�NOSTREAM�UNKNOWN_SIZE�
WORD_CLSIDN�L��I�iz>Need to fix a bug with 32 bit arrays, please contact author...T�zutf-8�cCsL|tjjjvrt�|�}|�|�|St�|�}|�t���|�|�|S)an
    Create a suitable logger object for this module.
    The goal is not to change settings of the root logger, to avoid getting
    other modules' logs on the screen.
    If a logger exists with same name, reuse it. (Else it would have duplicate
    handlers and messages would be doubled.)
    The level is set to CRITICAL+1 by default, to avoid any logging.
    )�logging�Logger�manager�
loggerDict�	getLogger�setLevel�
addHandler�NullHandler)�name�level�logger�r/�1/usr/lib/python3/dist-packages/olefile/olefile.py�
get_logger�s



r1�olefilecCst�tj�dS)z�
    Enable logging for this module (disabled by default).
    This will set the module-specific logger level to NOTSET, which
    means the main application controls the actual logging level.
    N)�logr)r$�NOTSETr/r/r/r0r�srs��ࡱ�l��l��l��l�������i�������	�
���
������������������@�A�B�C�D�E�F�G�H�z$00020900-0000-0000-C000-000000000046�(icCs�t|d�r|�tt��}|�d�n0t|t�r&t|�tkr&|dtt��}nt|d��}|�tt��}Wd�n1s=wY|tkrHdSdS)aJ
    Test if a file is an OLE container (according to the magic bytes in its header).

    .. note::
        This function only checks the first 8 bytes of the file, not the
        rest of the OLE structure.

    .. versionadded:: 0.16

    :param filename: filename, contents or file-like object of the OLE file (string-like or file-like object)

        - if filename is a string smaller than 1536 bytes, it is the path
          of the file to open. (bytes or unicode string)
        - if filename is a string longer than 1535 bytes, it is parsed
          as the content of an OLE file in memory. (bytes type only)
        - if filename is a file-like object (with read and seek methods),
          it is parsed as-is.

    :type filename: bytes or str or unicode or file
    :returns: True if OLE, False otherwise.
    :rtype: bool
    �readrN�rbTF)	�hasattrr\�lenr�seek�
isinstance�bytesr�open)�filename�header�fpr/r/r0rs
�rcCst|�S�N)�ord��cr/r/r0�i8?srkcCs|jtur|S|dS�Nr)�	__class__�intrir/r/r0rkCscC�t�d|||d��dS)z�
    Converts a 2-bytes (16 bits) string to an integer.

    :param c: string containing bytes to convert
    :param o: offset of bytes to convert in string
    z<Hr6r��struct�unpack�rj�or/r/r0�i16G�rucCro)z�
    Converts a 4-bytes (32 bits) string to an integer.

    :param c: string containing bytes to convert
    :param o: offset of bytes to convert in string
    z<Irrrprsr/r/r0�i32QrvrwcCsTt|�dksJ�|�d�sdSdt|d�t|d�t|d�fttt|dd���S)	z^
    Converts a CLSID to a human-readable string.

    :param clsid: string of length 16.
    rA��z0%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02Xrrr8r:)r_�striprwru�tuple�maprk)�clsidr/r/r0�_clsid[s
��r~cCs(t�dddddd�}|tj|dd�S)zL
        convert FILETIME (64 bits int) to Python datetime.datetime
        �Ar#rr<��microseconds)�datetime�	timedelta)�filetime�_FILETIME_null_dater/r/r0�filetime2datetimelsr�c@s8eZdZdZgd�Zgd�Zdd�Zdd�Zdd	�Zd
S)raT
    class to parse and store metadata from standard properties of OLE files.

    Available attributes:
    codepage, title, subject, author, keywords, comments, template,
    last_saved_by, revision_number, total_edit_time, last_printed, create_time,
    last_saved_time, num_pages, num_words, num_chars, thumbnail,
    creating_application, security, codepage_doc, category, presentation_target,
    bytes, lines, paragraphs, slides, notes, hidden_slides, mm_clips,
    scale_crop, heading_pairs, titles_of_parts, manager, company, links_dirty,
    chars_with_spaces, unused, shared_doc, link_base, hlinks, hlinks_changed,
    version, dig_sig, content_type, content_status, language, doc_version

    Note: an attribute is set to None when not present in the properties of the
    OLE file.

    References for SummaryInformation stream:

    - https://msdn.microsoft.com/en-us/library/dd942545.aspx
    - https://msdn.microsoft.com/en-us/library/dd925819%28v=office.12%29.aspx
    - https://msdn.microsoft.com/en-us/library/windows/desktop/aa380376%28v=vs.85%29.aspx
    - https://msdn.microsoft.com/en-us/library/aa372045.aspx
    - http://sedna-soft.de/articles/summary-information-stream/
    - https://poi.apache.org/apidocs/org/apache/poi/hpsf/SummaryInformation.html

    References for DocumentSummaryInformation stream:

    - https://msdn.microsoft.com/en-us/library/dd945671%28v=office.12%29.aspx
    - https://msdn.microsoft.com/en-us/library/windows/desktop/aa380374%28v=vs.85%29.aspx
    - https://poi.apache.org/apidocs/org/apache/poi/hpsf/DocumentSummaryInformation.html

    new in version 0.25
    )�codepage�title�subject�author�keywords�comments�template�
last_saved_by�revision_number�total_edit_time�last_printed�create_time�last_saved_time�	num_pages�	num_words�	num_chars�	thumbnail�creating_application�security)�codepage_doc�category�presentation_targetrb�lines�
paragraphs�slides�notes�
hidden_slides�mm_clips�
scale_crop�
heading_pairs�titles_of_partsr&�company�links_dirty�chars_with_spaces�unused�
shared_doc�	link_base�hlinks�hlinks_changed�version�dig_sig�content_type�content_status�language�doc_versioncCsd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_!d|_"d|_#d|_$d|_%d|_&d|_'d|_(d|_)d|_*d|_+d|_,d|_-d|_.dS)z_
        Constructor for OleMetadata
        All attributes are set to None by default
        N)/r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rbr�r�r�r�r�r�r�r�r�r&r�r�r�r�r�r�r�r�r�r�r�r�r�r���selfr/r/r0�__init__�s^
zOleMetadata.__init__cCs�|j|jD]}t||d�q|�d�r8|jdddgd�}tt|j��D]}|�|dd�}t||j||�q$|�d�r_|jddd�}tt|j��D]}|�|dd�}t||j||�qKdSdS)	a=
        Parse standard properties of an OLE file, from the streams
        ``\x05SummaryInformation`` and ``\x05DocumentSummaryInformation``,
        if present.
        Properties are converted to strings, integers or python datetime objects.
        If a property is not present, its value is set to None.
        NzSummaryInformationTr<)�convert_time�
no_conversionr#zDocumentSummaryInformation�r�)�SUMMARY_ATTRIBS�DOCSUM_ATTRIBS�setattr�exists�
getproperties�ranger_�get)r�r2�attrib�propsr!�valuer/r/r0�parse_properties�s$	
�
��zOleMetadata.parse_propertiescCshtd�|jD]}t||�}td|t|�f�qtd�|jD]}t||�}td|t|�f�q dS)z<
        Dump all metadata, for debugging purposes.
        z*Properties from SummaryInformation stream:�- %s: %sz2Properties from DocumentSummaryInformation stream:N)�printr��getattr�reprr�)r��propr�r/r/r0�dumps



�zOleMetadata.dumpN)	�__name__�
__module__�__qualname__�__doc__r�r�r�r�r�r/r/r/r0rzs$8 rc@seZdZdZdd�ZdS)�	OleStreama�
    OLE2 Stream

    Returns a read-only file object which can be used to read
    the contents of a OLE stream (instance of the BytesIO class).
    To open a stream, use the openstream method in the OleFile class.

    This function can be used with either ordinary streams,
    or ministreams, depending on the offset, sectorsize, and
    fat table arguments.

    Attributes:

        - size: actual size of data stream, after it was opened.
    c	Cs"t�d�t�d|||||t|�t|�f�||_|jjjr#td��d}	|tkr6t|�|}d}	t�d�||d|}
t�d|
�|
t|�krR|j�	t
d	�g}|d
krh|tkrht�d�|j�	t
d�t|
�D]�}t�d
||f�|tkr�|	r�t�d�n�t�d�|j�	t
d�|d
ks�|t|�kr�t�d||t|�f�t�d||
f�|j�	t
d�n�z|�
|||�Wnt�d|||||f�|j�	t
d�Yn_|�|�}
t|
�|k�r|t|�dk�rt�d|t|�||||t|
�f�t�d|||t|
��|j�	t
d�|�|
�z||d@}Wqlt�y=|j�	t
d�Ynwd�|�}t|�|k�r_t�dt|�|f�|d|�}||_n)|	�rqt�dt|��t|�|_nt�dt|�|f�t|�|_|j�	t
d�tj�||�dS) a_
        Constructor for OleStream class.

        :param fp: file object, the OLE container or the MiniFAT stream
        :param sect: sector index of first sector in the stream
        :param size: total size of the stream
        :param offset: offset in bytes for the first FAT or MiniFAT sector
        :param sectorsize: size of one sector
        :param fat: array/list of sector indexes (FAT or MiniFAT)
        :param filesize: size of OLE file (for debugging)
        :param olefileio: OleFileIO object containing this stream
        :returns: a BytesIO instance containing the OLE stream
        zOleStream.__init__:zE  sect=%d (%X), size=%d, offset=%d, sectorsize=%d, len(fat)=%d, fp=%sz2Attempting to open a stream from a closed OLE FileFTz  stream with UNKNOWN SIZEr#�nb_sectors = %dz(malformed OLE document, stream too largerz!size == 0 and sect != ENDOFCHAIN:z+incorrect OLE sector index for empty streamzReading stream sector[%d] = %Xhz6Reached ENDOFCHAIN sector for stream with unknown sizez$sect=ENDOFCHAIN before expected sizezincomplete OLE streamzsect=%d (%X) / len(fat)=%dzi=%d / nb_sectors=%d�,incorrect OLE FAT, sector index out of rangezsect=%d, seek=%d, filesize=%d�OLE sector index out of rangez9sect=%d / len(fat)=%d, seek=%d / filesize=%d, len read=%dzseek+len(read)=%d�incomplete OLE sectorr5�z3Read data of length %d, truncated to stream size %dNz3Read data of length %d, the stream size was unknownz9Read data of length %d, less than expected stream size %dz%OLE stream size is less than declared)r3�debugr_r��olerf�closed�OSErrorr�
_raise_defectrrr�r`r\�append�
IndexError�join�size�io�BytesIOr�)r�rf�sectr��offset�
sectorsize�fat�filesize�	olefileio�unknown_size�
nb_sectors�datar!�sector_datar/r/r0r�*s�
�




�
 �
�

zOleStream.__init__N)r�r�r�r�r�r/r/r/r0r�sr�c@s�eZdZdZdZdZe�e�eksJ�dd�Zdd�Z	dd	�Z
d
d�Zdd
�Zdd�Z
dd�Zdd�Zddd�Zdd�Zdd�ZdS)�OleDirectoryEntryz
    OLE2 Directory Entry
    z<64sHBBIII16sIQQIII�cCs`||_||_g|_i|_d|_t�tj|�\|_	|_
|_|_|_
|_|_}|_|_|_|_|_|_|jttttfvr@|�td�|jtkrO|dkrO|�td�|dkr^|jtkr^|�td�|j
dkrl|�td�d|_
|j	d|j
d	�|_|�|j�|_t� d
|jt!|j�f�t� d|j�t� d|j�t� d
|j
|j|jf�|j"dkr�|jdkr�|jdkr�t� d|j"|j|j|jf�|�t#d�|j|_$n|jt%|j�d>|_$t� d|j$|j|jf�t&|�|_'|jtkr�|j$dkr�|�t(d�d|_)|jttfv�r+|j$dk�r+|j$|j*k�r |jtk�r d|_)nd|_)|�+|j|j)�d|_,dS)aI
        Constructor for an OleDirectoryEntry object.
        Parses a 128-bytes entry from the OLE Directory stream.

        :param entry  : string (must be 128 bytes long)
        :param sid    : index of this directory entry in the OLE file directory
        :param olefile: OleFileIO containing this directory entry
        Fzunhandled OLE storage typerzduplicate OLE root entryzincorrect OLE root entryrQz(incorrect DirEntry name length >64 bytesNr6zDirEntry SID=%d: %sz - type: %dz - sect: %Xhz% - SID left: %d, right: %d, child: %d�r5z+sectorsize=%d, sizeLow=%d, sizeHigh=%d (%X)zincorrect OLE stream size� z% - size: %d (sizeLow=%d, sizeHigh=%d)zOLE storage with size>0T)-�sidr2�kids�	kids_dict�usedrqrrr��STRUCT_DIRENTRY�name_raw�
namelength�
entry_type�color�sid_left�	sid_right�	sid_child�dwUserFlags�
createTime�
modifyTime�
isectStart�sizeLow�sizeHighrrr
rr�r�
name_utf16�_decode_utf16_strr,r3r�r�r�rr��longr~r}r�
is_minifat�minisectorcutoff�_check_duplicate_stream�
sect_chain)r��entryr�r2r}r/r/r0r��st	�

�
�


zOleDirectoryEntry.__init__cCs�|jrdS|jttfvs|jdkrdSt�|_|jr!|js!|��|j	}|t
krB|j�|�|jr7|j|}n|j|}|t
ks(dSdSrl)
rr�rr
r��listr�minifat�loadminifatr�rr�r�)r�r2�	next_sectr/r/r0�build_sect_chain-s
�z"OleDirectoryEntry.build_sect_chaincCsFt�d|jt|j�|jf�|jtkr!|�|j�|j�	�dSdS)z�
        Read and build the red-black tree attached to this OleDirectoryEntry
        object, if it is a storage.
        Note that this method builds a tree of all subentries, so it should
        only be called for the root object once.
        z.build_storage_tree: SID=%d - %s - sid_child=%dN)
r3r�r�r�r,r�r�append_kidsr��sortr�r/r/r0�build_storage_tree@s�
	�z$OleDirectoryEntry.build_storage_treecCs�t�d|�|tkr
dS|dks|t|jj�kr"|j�td�dS|j�|�}t�d|j	t
|j�|j|j
|jf�|jrG|j�td�dSd|_|�|j�|j��}||jvra|j�td�|j�|�||j|<|�|j
�|��dS)	a)
        Walk through red-black tree of children of this directory entry to add
        all of them to the kids list. (recursive method)

        :param child_sid: index of child directory entry to use, or None when called
            first time for the root. (only used during recursion)
        zappend_kids: child_sid=%dNrzOLE DirEntry index out of rangezHappend_kids: child_sid=%d - %s - sid_left=%d, sid_right=%d, sid_child=%dz#OLE Entry referenced more than onceTz!Duplicate filename in OLE storage)r3r�rr_r2�
direntriesr�r�_load_direntryr�r�r,r�r�r�r�r
�lowerr�r�r�r)r��	child_sid�child�
name_lowerr/r/r0r
Xs2��

�
zOleDirectoryEntry.append_kidscCs|j|jkS�zCompare entries by name�r,�r��otherr/r/r0�__eq__��zOleDirectoryEntry.__eq__cCs|j|jkSrrrr/r/r0�__lt__�rzOleDirectoryEntry.__lt__cCs|�|�Srg)rrr/r/r0�__ne__��zOleDirectoryEntry.__ne__cCs|�|�p	|�|�Srg)rrrr/r/r0�__le__�szOleDirectoryEntry.__le__rcCs�gd�}z||j}Wntyd}Ynwtd|t|j�|dd�|jttfvr4t|jddd�t�|jttfvrL|j	rLtd|d|j	�|j
D]	}|�|d�qOdS)	zADump this entry, and all its subentries (for debug purposes only))z	(invalid)z	(storage)z(stream)z(lockbytes)z
(property)z(root)z	(UNKNOWN)� ��endrbz{%s}r6N)r�r�r�r�r,r
rr�rr}r�r�)r��tab�TYPES�	type_name�kidr/r/r0r��s�
�zOleDirectoryEntry.dumpcC�|jdkrdSt|j�S)z�
        Return modification time of a directory entry.

        :returns: None if modification time is null, a python datetime object
            otherwise (UTC timezone)

        new in version 0.26
        rN)r�r�r�r/r/r0�getmtime��
	
zOleDirectoryEntry.getmtimecCr')z�
        Return creation time of a directory entry.

        :returns: None if modification time is null, a python datetime object
            otherwise (UTC timezone)

        new in version 0.26
        rN)r�r�r�r/r/r0�getctime�r)zOleDirectoryEntry.getctimeN�r)r�r�r�r�r��
DIRENTRY_SIZErq�calcsizer�rrr
rrrrr�r(r*r/r/r/r0r��s b/
	r�c@sZeZdZdZdeddefdd�Zdd�Zdd	�Ze	fd
d�Z
dPd
d�ZdQdd�Zdd�Z
dQdd�ZdRdd�ZdRdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�ZdSd%d&�ZdSd'd(�Zd)d*�Zd+d,�Zd-d.�Zedfd/d0�ZdTd2d3�ZdTd4d5�Zd6d7�Zd8d9�Z d:d;�Z!d<d=�Z"d>d?�Z#d@dA�Z$dBdC�Z%dDdE�Z&dFdG�Z'dHdI�Z(dJdK�Z)dUdLdM�Z*dNdO�Z+dS)Vra�
    OLE container object

    This class encapsulates the interface to an OLE 2 structured
    storage file.  Use the listdir and openstream methods to
    access the contents of this file.

    Object names are given as a list of strings, one for each subentry
    level.  The root entry should be omitted.  For example, the following
    code extracts all image streams from a Microsoft Image Composer file::

        ole = OleFileIO("fan.mic")

        for entry in ole.listdir():
            if entry[1:2] == "Image":
                fin = ole.openstream(entry)
                fout = open(entry[0:1], "wb")
                while True:
                    s = fin.read(8192)
                    if not s:
                        break
                    fout.write(s)

    You can use the viewer application provided with the Python Imaging
    Library to view the resulting files (which happens to be standard
    TIFF files).
    NFcCs
||_g|_||_||_d|_d|_g|_g|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_!d|_"d|_#d|_$d|_%d|_&|r�|j'||d�dSdS)a�
        Constructor for the OleFileIO class.

        :param filename: file to open.

            - if filename is a string smaller than 1536 bytes, it is the path
              of the file to open. (bytes or unicode string)
            - if filename is a string longer than 1535 bytes, it is parsed
              as the content of an OLE file in memory. (bytes type only)
            - if filename is a file-like object (with read, seek and tell methods),
              it is parsed as-is.

        :param raise_defects: minimal level for defects to be raised as exceptions.
            (use DEFECT_FATAL for a typical application, DEFECT_INCORRECT for a
            security-oriented application, see source code for details)

        :param write_mode: bool, if True the file is opened in read/write mode instead
            of read-only by default.

        :param debug: bool, set debug mode (deprecated, not used anymore)

        :param path_encoding: None or str, name of the codec to use for path
            names (streams and storages), or None for Unicode.
            Unicode by default on Python 3+, UTF-8 on Python 2.x.
            (new in olefile 0.42, was hardcoded to Latin-1 until olefile v0.41)
        N)�
write_mode)(�_raise_defects_level�parsing_issuesr.�
path_encoding�	_filesize�
ministream�_used_streams_fat�_used_streams_minifat�
byte_order�directory_fpr�dll_versionr��first_difat_sector�first_dir_sector�first_mini_fat_sectorrf�header_clsid�header_signature�metadata�mini_sector_shift�mini_sector_size�mini_stream_cutoff_sizer	�minifatsectr�minisectorsize�
minor_version�nb_sect�num_difat_sectors�num_dir_sectors�num_fat_sectors�num_mini_fat_sectors�	reserved1�	reserved2�root�sector_shift�sector_size�transaction_signature_numberrc)r�rd�
raise_defectsr.r�r1r/r/r0r��sV�zOleFileIO.__init__cCs|Srgr/r�r/r/r0�	__enter__6szOleFileIO.__enter__cGs|��dSrg)�close)r��argsr/r/r0�__exit__:rzOleFileIO.__exit__cCs:||jkrt�|�||��|j�||f�t�|�dS)a�
        This method should be called for any defect found during file parsing.
        It may raise an IOError exception according to the minimal level chosen
        for the OleFileIO object.

        :param defect_level: defect level, possible values are:

            - DEFECT_UNSURE    : a case which looks weird, but not sure it's a defect
            - DEFECT_POTENTIAL : a potential defect
            - DEFECT_INCORRECT : an error according to specifications, but parsing can go on
            - DEFECT_FATAL     : an error which cannot be ignored, parsing is impossible

        :param message: string describing the defect, used with raised exception.
        :param exception_type: exception class to be raised, IOError by default
        N)r/r3�errorr0r��warning)r��defect_level�message�exception_typer/r/r0r�>s


zOleFileIO._raise_defect�replacecCs$|�d|�}|jr|�|j|�S|S)a�
        Decode a string encoded in UTF-16 LE format, as found in the OLE
        directory or in property streams. Return a string encoded
        according to the path_encoding specified for the OleFileIO object.

        :param utf16_str: bytes string encoded in UTF-16 LE format
        :param errors: str, see python documentation for str.decode()
        :return: str, encoded according to path_encoding
        zUTF-16LE)�decoder1�encode)r��	utf16_str�errors�unicode_strr/r/r0rXs
zOleFileIO._decode_utf16_strc	Cs�||_t|d�r||_n t|t�rt|�tkrt�|�|_n|jr$d}nd}t	||�|_d}|j�
dtj�z
|j�
�}W|j�
d�n|j�
d�w||_t�d|j|jf�g|_g|_|j�d�}t|�dkss|dd�tkr�t�d	|dd�tf�|�td
�d}t�|�}t�d||d
f�|d|�}t�||�\|_|_|_|_|_|_|_ |_!|_"|_#|_$|_%|_&|_'|_(|_)|_*|_+t�t�||��|jtkr�|�td�|jt,d�kr�|�t-d�t�d|j�t�d|j�|jdv�r|�t-d�t�d|j�|jdk�r|�t-d�d|j|_.t�d|j.�|j.dv�r3|�t-d�|jdk�r?|j.dk�sK|jdk�rQ|j.dk�rQ|�t-d�d|j |_/t�d |j/�|j/d!v�rk|�t-d"�|j!dk�sw|j"dk�r}|�t-d#�t�d$|j#�|j.dk�r�|j#dk�r�|�t-d%�t�d&|j$�t�d'|j%�t�d(|j&�|j&dk�r�|�t0d)�t�d*|j'�|j'dk�r�|�t-d+�t�1d,|j'�d|_'t�d-|j(�t�d.|j)�t�d/|j*�t�d0|j+�||j.d1|j.d1|_2t�d2|j2|j2f�t3|dd3��|_|j.|_4|j/|_5|j'|_6|�7|j%�|j)�r7|�7|j(�|j+�rA|�7|j*�|�8|�|�9|j%�|j(|_:dS)4a�
        Open an OLE2 file in read-only or read/write mode.
        Read and parse the header, FAT and directory.

        :param filename: string-like or file-like object, OLE file to parse

            - if filename is a string smaller than 1536 bytes, it is the path
              of the file to open. (bytes or unicode string)
            - if filename is a string longer than 1535 bytes, it is parsed
              as the content of an OLE file in memory. (bytes type only)
            - if filename is a file-like object (with read, seek and tell methods),
              it is parsed as-is.

        :param write_mode: bool, if True the file is opened in read/write mode instead
            of read-only by default. (ignored if filename is not a path)
        r\zr+br]rzFile size: %d bytes (%Xh)r�Nr:zMagic = %r instead of %rz#not an OLE2 structured storage filez<8s16sHHHHHHLLLLLLLLLLzfmt_header size = %d, +FAT = %di�zincorrect OLE signaturerAzincorrect CLSID in OLE headerzMinor Version = %dz%DLL Version   = %d (expected: 3 or 4))r"rz"incorrect DllVersion in OLE headerz#Byte Order    = %X (expected: FFFE)i��z!incorrect ByteOrder in OLE headerr6z0Sector Size   = %d bytes (expected: 512 or 4096))r�rZz#incorrect sector_size in OLE headerr"rrZz3sector_size does not match DllVersion in OLE headerz/MiniFAT Sector Size   = %d bytes (expected: 64))rQz(incorrect mini_sector_size in OLE headerz.incorrect OLE header (non-null reserved bytes)z Number of Directory sectors = %dz3incorrect number of directory sectors in OLE headerzNumber of FAT sectors = %dzFirst Directory sector  = %Xhz$Transaction Signature Number    = %dz5incorrect OLE header (transaction_signature_number>0)z/Mini Stream cutoff size = %Xh (expected: 1000h)z/incorrect mini_stream_cutoff_size in OLE headerzJFixing the mini_stream_cutoff_size to 4096 (mandatory value) instead of %dzFirst MiniFAT sector      = %XhzNumber of MiniFAT sectors = %dzFirst DIFAT sector        = %XhzNumber of DIFAT sectors   = %dr#z/Maximum number of sectors in the file: %d (%Xh)rI);r.r^rfrarbr_rr�r�rcr`�os�SEEK_END�tellr2r3r�r4r5r\rr�rrqr-rrr=r<rDr8r6rMr?rJrKrGrHr:rOrAr;rIr9rF�	bytearrayrrNr@rrVrEr~r�rCrr�loadfat�
loaddirectoryrB)	r�rdr.�moder�re�
fmt_header�header_size�header1r/r/r0rcks�
'

�
�
zOleFileIO.opencC�|j��dS)z@
        close the OLE file, to release the file object
        N)rfrRr�r/r/r0rRK�zOleFileIO.closecCsh|r
t�d|�|j}nt�d|�|ttttfvrdS|j}||vr-|�t	d�dS|�
|�dS)ag
        Checks if a stream has not been already referenced elsewhere.
        This method should only be called once for each known stream, and only
        if stream size is not null.

        :param first_sect: int, index of first sector of the stream in FAT
        :param minifat: bool, if True, stream is located in the MiniFAT, else in the FAT
        z,_check_duplicate_stream: sect=%Xh in MiniFATz(_check_duplicate_stream: sect=%Xh in FATNzStream referenced twice)r3r�r5rrrrr4r�rr�)r��
first_sectr	�used_streamsr/r/r0rRs	z!OleFileIO._check_duplicate_streamrc
Cs�d}tdtdtdtdi}t|�}||d|}tddd	�t|�D]
}td
|dd	�q"t�t|�D]G}||}	td||	dd	�t|	|	|�D],}||krSn%||}
|
d@}||vrd||}n
|
|dkrmd
}nd
|
}t|dd	�qKt�q4dS)zU
        Display a part of FAT in human-readable form for debugging purposes
        r:z..free..z[ END. ]zFATSECT zDIFSECT r#�indexr r!�%8X�%6X:r5z    --->N)rrrrr_r�r�)
r�r��
firstindex�VPL�fatnames�nbsect�nlinesr!�lrnr��auxr,r/r/r0�dumpfatls8�
�zOleFileIO.dumpfatcCs�d}t�t|�}tjdkr|��t|�}||d|}tddd�t|�D]
}td|dd�q't�t|�D]1}||}	td||	dd�t|	|	|�D]}||krXn||}
d|
}t|dd�qPt�q9d	S)
zS
        Display a sector in a human-readable form, for debugging purposes
        r:�bigr#rnr r!rorpN)�array�UINT32�sys�	byteorder�byteswapr_r�r�)r��sectorrqrrr#rtrur!rvrnr�r,r/r/r0�dumpsect�s*
�zOleFileIO.dumpsectcCs"t�t|�}tjdkr|��|S)z�
        convert a sector to an array of 32 bits unsigned integers,
        swapping bytes on big endian CPUs such as PowerPC (old Macs)
        ry)rzr{r|r}r~)r�r��ar/r/r0�
sect2array�s
zOleFileIO.sect2arraycCs�t|tj�r	|}n|�|�}t�tj�r|�|�d}|D]-}|d@}t�d|�|t	ks2|t
kr:t�d�|S|�|�}|�|�}|j||_q|S)z�
        Adds the indexes of the given sector to the FAT

        :param sect: string containing the first FAT sector, or array of long integers
        :returns: index of last FAT sector.
        Nr5z
isect = %Xzfound end of sector chain)
rarzr�r3�isEnabledForr$�DEBUGr�r�rr�getsectr�)r�r��fat1�isect�s�nextfatr/r/r0�loadfat_sect�s"



�
zOleFileIO.loadfat_sectc	Cs�t�d�|dd�}t�dt|�t|�df�t�t�|_|�|�|jdkr�t�d�|jdkr:|�	t
d	�|j|jkrF|�	t
d
�t�d�|jdd}|jd|d|}t�d
|�|j|krmtd��|j}t|�D]4}t�d||f�|�|�}|�|�}t�tj�r�|�|�|�|d|��||}t�d|�qt|ttfvr�td��nt�d�t|j�|jkr�t�dt|j�|jf�|jd|j�|_t�dt|j�|jf�t�tj�r�t�d�|�|j�dSdS)z%
        Load the FAT table.
        zDLoading the FAT table, starting with the 1st sector after the header�Lr�zlen(sect)=%d, so %d integersrrz)DIFAT is used, because file size > 6.8MB.�mz#incorrect DIFAT, not enough sectorsz)incorrect DIFAT, first index out of rangezDIFAT analysis...r#z
nb_difat = %dzincorrect DIFATzDIFAT block %d, sector %XNznext DIFAT sector: %Xzincorrect end of DIFATz$No DIFAT, because file size < 6.8MB.z!len(fat)=%d, shrunk to nb_sect=%dz6FAT references %d sectors / Maximum %d sectors in filez
FAT:)r3r�r_rzr{r�r�rFrHr�rr9rErr��IOError�	iterranger�r�r�r$r�r�rrrx)	r�rer��nb_difat_sectors�nb_difat�isect_difatr!�sector_difat�difatr/r/r0rd�sN
	









�

�zOleFileIO.loadfatcCs�|j|j}|jj|jd|j}|d}t�d|j|j|||f�||kr.|�t	d�|j
|j|dd���}|�|�|_
t�dt|j
�|f�|j
d|�|_
t�d	t|j
��t�tj�rpt�d
�|�|j
�dSdS)z)
        Load the MiniFAT table.
        r#rzaloadminifat(): minifatsect=%d, nb FAT sectors=%d, used_size=%d, stream_size=%d, nb MiniSectors=%dz%OLE MiniStream is larger than MiniFATT��	force_FATz$MiniFAT shrunk from %d to %d sectorsNzloadminifat(): len=%dz	
MiniFAT:)rIrNrLr�r@r3r�rBr�r�_openr\r�r	r_r�r$r�rx)r��stream_size�nb_minisectors�	used_sizer�r/r/r0r
.s"�
�zOleFileIO.loadminifatc
Cs�z
|j�|j|d�Wnt�d||j|d|jf�|�td�Y|j�|j�}t	|�|jkrIt�d|t	|�|jf�|�td�|S)z�
        Read given sector from file on disk.

        :param sect: int, sector index
        :returns: a string containing the sector data.
        r#z(getsect(): sect=%X, seek=%d, filesize=%dr�z*getsect(): sect=%X, read=%d, sectorsize=%dr�)
rfr`r�r3r�r2r�rr\r_)r�r�rr/r/r0r�Rs��zOleFileIO.getsectrxc
Cs�t|t�s	td��t|t�rt|�dkrtd��z
|j�|j|d�Wnt�d||j|d|j	f�|�
td�Yt|�|jkrS|||jt|�7}nt|�|jkr^td��|j�
|�dS)z�
        Write given sector to file on disk.

        :param sect: int, sector index
        :param data: bytes, sector data
        :param padding: single byte, padding character if data < sector size
        z'write_sect: data must be a bytes stringr#z4write_sect: padding must be a bytes string of 1 charz+write_sect(): sect=%X, seek=%d, filesize=%dr��Data is larger than sector sizeN)rarb�	TypeErrorr_rfr`r�r3r�r2r�r�
ValueError�write)r�r�r��paddingr/r/r0�
write_sectrs 
�zOleFileIO.write_sectcCs�t|t�s	td��t|t�rt|�dkrtd��z|j�|�Wnt�d||jf�|�	t
d�Yt|�}||jkrG|||j|7}|j|krPtd��|j�
|�dS)z�
        Write given sector to file on disk.

        :param fp_pos: int, file position
        :param data: bytes, sector data
        :param padding: single byte, padding character if data < sector size
        z,write_mini_sect: data must be a bytes stringr#z9write_mini_sect: padding must be a bytes string of 1 charz)write_mini_sect(): fp_pos=%d, filesize=%dr�r�N)rarbr�r_rfr`r3r�r2r�rr@r�r�)r��fp_posr�r��len_datar/r/r0�_write_mini_sect�s"
�

zOleFileIO._write_mini_sectcCslt�d�|j|dd�|_|jjd}t�d|jj|f�dg||_|�d�}|jd|_|j��dS)z]
        Load the directory.

        :param sect: sector index of directory stream.
        zLoading the Directory:Tr�r�z&loaddirectory: size=%d, max_entries=%dNr)	r3r�r�r7r�rrrLr)r�r��max_entries�
root_entryr/r/r0re�s

�
zOleFileIO.loaddirectorycCs~|dks|t|j�kr|�td�|j|dur#|�td�|j|S|j�|d�|j�d�}t|||�|j|<|j|S)aY
        Load a directory entry from the directory.
        This method should only be called once for each storage/stream when
        loading the directory.

        :param sid: index of storage/stream in the directory.
        :returns: a OleDirectoryEntry object

        :exception IOError: if the entry has always been referenced.
        rz OLE directory index out of rangeNz'double reference for OLE stream/storager�)	r_rr�rrr7r`r\r�)r�r�rr/r/r0r�s�

zOleFileIO._load_direntrycCrj)z5
        Dump directory (for debugging only)
        N)rLr�r�r/r/r0�
dumpdirectory�rkzOleFileIO.dumpdirectoryc
Cs�t�d||t|�f�||jkrE|sE|js4|��|jj}t�d|jj|f�|j	|jj|dd�|_t
|j||d|j|j|jj|d�St
|j
|||j|j|j|j|d�S)a|
        Open a stream, either in FAT or MiniFAT according to its size.
        (openstream helper)

        :param start: index of first sector
        :param size: size of stream (or nothing if size is unknown)
        :param force_FAT: if False (default), stream will be opened in FAT or MiniFAT
            according to size. If True, it will always be opened in FAT.
        z1OleFileIO.open(): sect=%Xh, size=%d, force_FAT=%sz%Opening MiniStream: sect=%Xh, size=%dTr�r)rfr�r�r�r�r�r�r�)r3r��strrr3r
rLr�r�r�r�rCr	rfr�r�r2)r��startr�r��size_ministreamr/r/r0r��s0
�
�
�

�
�zOleFileIO._openTcCs�||jg}|jD];}|jtkr)|r|�|dd�|jg�|�|||||�q	|jtkr>|r=|�|dd�|jg�q	|�td�q	dS)a�
        listdir helper

        :param files: list of files to fill in
        :param prefix: current location in storage tree (list of names)
        :param node: current node (OleDirectoryEntry object)
        :param streams: bool, include streams if True (True by default) - new in v0.26
        :param storages: bool, include storages if True (False by default) - new in v0.26
            (note: the root storage is never included)
        r#NzIThe directory tree contains an entry which is not a stream nor a storage.)	r,r�r�rr��_listr
r�r)r��files�prefix�node�streams�storagesrr/r/r0r�s


��zOleFileIO._listcCsg}|�|g|j||�|S)am
        Return a list of streams and/or storages stored in this file

        :param streams: bool, include streams if True (True by default) - new in v0.26
        :param storages: bool, include storages if True (False by default) - new in v0.26
            (note: the root storage is never included)
        :returns: list of stream and/or storage paths
        )r�rL)r�r�r�r�r/r/r0�listdir3s	zOleFileIO.listdircCsXt|t�r
|�d�}|j}|D]}|jD]
}|j��|��kr!nqtd��|}q|jS)a*
        Returns directory entry of given filename. (openstream helper)
        Note: this method is case-insensitive.

        :param filename: path of stream in storage tree (except root entry), either:

            - a string using Unix path syntax, for example:
              'storage_1/storage_1.2/stream'
            - or a list of storage filenames, path to the desired stream/storage.
              Example: ['storage_1', 'storage_1.2', 'stream']

        :returns: sid of requested filename
        :exception IOError: if file not found
        �/zfile not found)	ra�
basestring�splitrLr�r,rr�r�)r�rdr�r,r&r/r/r0�_findAs


�zOleFileIO._findcCs6|�|�}|j|}|jtkrtd��|�|j|j�S)a;
        Open a stream as a read-only file object (BytesIO).
        Note: filename is case-insensitive.

        :param filename: path of stream in storage tree (except root entry), either:

            - a string using Unix path syntax, for example:
              'storage_1/storage_1.2/stream'
            - or a list of storage filenames, path to the desired stream/storage.
              Example: ['storage_1', 'storage_1.2', 'stream']

        :returns: file object (read-only)
        :exception IOError: if filename not found, or if this is not a stream.
        zthis file is not a stream)r�rr�r
r�r�r�r��r�rdr�rr/r/r0�
openstreamas



zOleFileIO.openstreamcCs�|js|�|�t|j�}|jjs|j�|�|j|j}t|j�D]@\}}||}||}|jj|d|j||j}	||dkrS|||j|d|j�}
n	|||jd�}
|�|	|
�q"dS)Nr#)rrr_rLrNr@�	enumerater�)r�r�
data_to_writer��
block_size�idxr��	sect_base�sect_offsetr��data_per_sectorr/r/r0�_write_mini_streamvs

 �zOleFileIO._write_mini_streamc
	Cszt|t�s	td��|�|�}|j|}|jtkrtd��|j}|t	|�kr)t
d��||jkr:|jtkr:|j
||d�S|j}||jd|j}t�d|�t|�D]`}||dkrr|||j|d|j�}	t	|	�|jksqJ�n(|||jd�}	t�d||jt	|	�||jf�t	|	�|j||jks�J�|�||	�z|j|}WqRty�td	��w|tkr�td
��dS)aD
        Write a stream to disk. For now, it is only possible to replace an
        existing stream by data of the same size.

        :param stream_name: path of stream in storage tree (except root entry), either:

            - a string using Unix path syntax, for example:
              'storage_1/storage_1.2/stream'
            - or a list of storage filenames, path to the desired stream/storage.
              Example: ['storage_1', 'storage_1.2', 'stream']

        :param data: bytes, data to be written, must be the same size as the original
            stream.
        z)write_stream: data must be a bytes stringzthis is not a streamz?write_stream: data must be the same size as the existing stream)rr�r#r�NzGwrite_stream: size=%d sectorsize=%d data_sector=%Xh size%%sectorsize=%dr�z)incorrect last sector index in OLE stream)rarbr�r�rr�r
r�r�r_r�rrr�r�r�r3r�r�r�r�r�r)
r��stream_namer�r�rr�r�r�r!�data_sectorr/r/r0�write_stream�s@



���zOleFileIO.write_streamcCs*z|�|�}|j|}|jWSYdS)a�
        Test if given filename exists as a stream or a storage in the OLE
        container, and return its type.

        :param filename: path of stream in storage tree. (see openstream for syntax)
        :returns: False if object does not exist, its entry type (>0) otherwise:

            - STGTY_STREAM: a stream
            - STGTY_STORAGE: a storage
            - STGTY_ROOT: the root entry
        F)r�rr�r�r/r/r0�get_type�s

zOleFileIO.get_typecCs|�|�}|j|}|jS)a
        Return clsid of a stream/storage.

        :param filename: path of stream/storage in storage tree. (see openstream for
            syntax)
        :returns: Empty string if clsid is null, a printable representation of the clsid otherwise

        new in version 0.44
        )r�rr}r�r/r/r0�getclsid�s


zOleFileIO.getclsidcC�|�|�}|j|}|��S)a9
        Return modification time of a stream/storage.

        :param filename: path of stream/storage in storage tree. (see openstream for
            syntax)
        :returns: None if modification time is null, a python datetime object
            otherwise (UTC timezone)

        new in version 0.26
        )r�rr(r�r/r/r0r(��

zOleFileIO.getmtimecCr�)a1
        Return creation time of a stream/storage.

        :param filename: path of stream/storage in storage tree. (see openstream for
            syntax)
        :returns: None if creation time is null, a python datetime object
            otherwise (UTC timezone)

        new in version 0.26
        )r�rr*r�r/r/r0r*�r�zOleFileIO.getctimecCsz|�|�}WdSYdS)a
        Test if given filename exists as a stream or a storage in the OLE
        container.
        Note: filename is case-insensitive.

        :param filename: path of stream in storage tree. (see openstream for syntax)
        :returns: True if object exist, else False.
        TF)r�)r�rdr�r/r/r0r�	s
	
zOleFileIO.existscCs,|�|�}|j|}|jtkrtd��|jS)a2
        Return size of a stream in the OLE container, in bytes.

        :param filename: path of stream in storage tree (see openstream for syntax)
        :returns: size in bytes (long integer)
        :exception IOError: if file not found
        :exception TypeError: if this is not a stream.
        zobject is not an OLE stream)r�rr�r
r�r�r�r/r/r0�get_sizes

	

zOleFileIO.get_sizecCs|jjS)zp
        Return root entry name. Should usually be 'Root Entry' or 'R' in most
        implementations.
        )rLr,r�r/r/r0�get_rootentry_name*szOleFileIO.get_rootentry_namecCs2|dkrg}|}t|t�sd�|�}|�|�}i}z7|�d�}t|dd��}|�d�}t|dd��}	|�t|d��d|�t|�d	��d	�}t|d	�}
Wn%tyu}zd
t	|�|f}|�
t|t|��|WYd}~Sd}~wwt
|
tt|�d��}
t|
�D�]�}
d}�zft|d|
d�}t|d|
d�}t||�}t�d
|||f�|tkr�t||d	�}|dkr�|d}�n*|tkr�t||d	�}�n|tttfvr�t||d	�}�n
|ttfvr�t||d	�}n�|ttfv�rt||d	�}||d|d|d�}|�dd�}n�|tk�r)t||d	�}||d|d|�}n�|tk�rGt||d	�}|� ||d|d|d��}n�|t!k�r�t"t||d	��t"t||d��d>}|�r�||v�r�t�d||t#|�df�t$�$dddddd�}t�d|d�|t$j%|dd�}nX|d}nS|t&k�r�t'||d	�}nE|t(k�r�t||d	|d��}n3|t)k�r�t||d	�}||d|d|�}n|t*k�r�t+t||d	��}nd}t�d||f�|||<Wq�t�y}zd|t	|�|f}|�
t|t|��WYd}~q�d}~ww|S)a�
        Return properties described in substream.

        :param filename: path of stream in storage tree (see openstream for syntax)
        :param convert_time: bool, if True timestamps will be converted to Python datetime
        :param no_conversion: None or list of int, timestamps not to be converted
            (for example total editing time is not a real timestamp)

        :returns: a dictionary of values indexed by id (integer)
        Nr�rMr:rIrErAs****rz6Error while parsing properties header in stream %s: %srr>z!property id=%d: type=%d offset=%Xi�ir#rxr�r6r�z8Converting property #%d to python datetime, value=%d=%fsi���rztimedelta days=%dl@�T$r<r�z5property id=%d: type=%d not implemented in parser yetz3Error while parsing property id %d in stream %s: %s),rar�r�r�r\r~r`rw�
BaseExceptionr�r�r�type�minrnr_r�r3r��VT_I2ru�VT_UI2�VT_I4�VT_INT�VT_ERROR�VT_UI4�VT_UINT�VT_BSTR�VT_LPSTRrZ�VT_BLOB�	VT_LPWSTRr�VT_FILETIMEr�floatr�r��VT_UI1rk�VT_CLSID�VT_CF�VT_BOOL�bool)r�rdr�r��
streampathrfr�r�r}�fmtid�	num_props�exc�msgr!�property_idr��
property_typer��countr�r/r/r0r�2s�





���

�

$
(�





���zOleFileIO.getpropertiescCst�|_|j�|�|jS)z�
        Parse standard properties streams, return an OleMetadata object
        containing all the available metadata.
        (also stored in the metadata attribute of the OleFileIO object)

        new in version 0.25
        )rr>r�r�r/r/r0�get_metadata�szOleFileIO.get_metadata)rZ)Fr+)rx)TF)FN),r�r�r�r�rrr�rQrTr�r�rrcrRrrxr�r�r�rdr
r�r�r�rerr�rr�r�r�r�r�r�r�r�r�r(r*r�r�r�r�r�r/r/r/r0r�sT
�M

a


%$T$
 
)
&
 >
rc	Cs�ddl}ddl}d}tjtjtjtjtjd�}d}|j|d�}|j	ddd	d
d�|j	ddd
dd�|j	dddd|dd�|�
�\}}tdtt
f�t|�dkr\tt�|��|��|jrbd|_tj||jdd�t�|D�]M}�z>t|�}	td�t|�td�|	��|	��D]`}
|
dddkr�td|
�zC|	j|
dd�}t|���}|D]1\}}
t|
ttf�r�t|
�dkr�|
dd�}
t|
t�r�d D]}|t|
�vr�d!}
nq�td"||
�q�Wq�t �!d#|
�Yq�q�|j"�r-td$�|	��D].}
td%t#d&�$|
��d%d'd(�|	�%|
�}|t&k�r#td)|	�'|
��|	�(|
�q�td*|�q�t�td+�|	j)D]}|du�rItd,|j*|�+�|�,�f��q4t�z
|	�-�}|�.�Wn	t �!d-�Yt�|	�/�}td.|�|	�0d/��r�td0�td1|	�%d/��td2|	�'d/��|	�0d3��r�td4�td5�|	j1�r�|	j1D]\}}td6|j2|f��q�ntd7�Wqqt �!d8|�YqqdS)9z�
    Main function when olefile is runs as a script from the command line.
    This will open an OLE2 file and display its structure and properties
    :return: nothing
    rNrV)r��inforVrU�criticalz1usage: %prog [options] <filename> [filename2 ...])�usagez-c�
store_true�
check_streamsz*check all streams (for debugging purposes))�action�dest�helpz-d�
debug_modez\debug mode, shortcut for -l debug (displays a lot of debug information, for developers only)z-lz
--loglevel�loglevel�storezBlogging level debug/info/warning/error/critical (default=%default))r�r��defaultr�z=olefile version %s %s - https://www.decalage.info/en/olefile
r�z%(levelname)-8s %(message)s)r-�formatzD--------------------------------------------------------------------����z%r: propertiesTr��2)r#r6r"rr7r8r9r=r>r@�rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPz
(binary data)z   z&Error while parsing property stream %rz
Checking streams...�-r�r r!zsize %dzNOT a stream : type=%dz5Modification/Creation times of all directory entries:z- %s: mtime=%s ctime=%szError while parsing metadatazRoot entry name: "%s"�worddocumentzThis is a Word document.ztype of stream 'WordDocument':zsize :z
macros/vbaz%This document may contain VBA macros.z(
Non-fatal issues raised during parsing:r��NonezError while parsing file %r)3r|�optparser$r��INFO�WARNING�ERROR�CRITICAL�OptionParser�
add_option�
parse_argsr��__version__�__date__r_r��
print_help�exitr�r��basicConfigrrr�r�r��sorted�itemsrar�rbrcr3�	exceptionr�r�r�r�r
r�r�rr,r(r*r�r�r�r�r0r�)r|r��DEFAULT_LOG_LEVEL�
LOG_LEVELSr��parser�optionsrSrdr��
streamnamer��k�vrj�st_typer�metarL�exctyper�r/r/r0�main�s��
�
��

��
�



�����r�__main__r+)mr��
__future__rrr�
__author__�__all__r�r|rqrz�os.pathr`r�r$r�rbrnr�xranger�r��itemsizer{r�r��	NameErrorr	�version_inforr�r1r3rrrrrrrrrrrr
rr
rr�VT_EMPTY�VT_NULLr�r��VT_R4�VT_R8�VT_CY�VT_DATEr��VT_DISPATCHr�r��
VT_VARIANT�
VT_UNKNOWN�
VT_DECIMAL�VT_I1r�r�r��VT_I8�VT_UI8r�r��VT_VOID�
VT_HRESULT�VT_PTR�VT_SAFEARRAY�	VT_CARRAY�VT_USERDEFINEDr�r�r�r��	VT_STREAM�
VT_STORAGE�VT_STREAMED_OBJECT�VT_STORED_OBJECT�VT_BLOB_OBJECTr�r��	VT_VECTORrrrrrrrrkrurwr~r�rr�r�r�rrr�r/r/r/r0�<module>s�<
(�
*




"

�

Youez - 2016 - github.com/yon3zu
LinuXploit