OwlCyberSecurity - MANAGER
Edit File: mimetypes.pyo
� zfc�������� ���@���sq��d��Z��d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�y�d�d�l�Z�Wn�e�k �r_�d�Z�n�Xd�d�d�d�d�d�g�Z�d �d �d�d�d �d�d�d�d�g �Z �e �a�d�a�d�d-�d�������YZ �e�d���Z�e�d���Z�e�d���Z�e�d���Z�d�d���Z�d����Z�d����Z�e����e�d�k�rmd�d�l�Z�d�Z�d�d���Z�y/�e�j�e�j�d�d�d �d!�d"�g���\�Z�Z�Wn#�e�j�k �r�Z�e�d�e���n�Xd�Z�d#�Z �xW�e�D]O�\�Z!�Z"�e!�d.�k�r�e�d#���q�e!�d/�k�r�d#�Z�q�e!�d0�k�r�d�Z �q�q�Wxx�e�D]m�Z#�e �r.e�e#�e���Z$�e$�s&d*�Ge#�GHqfe$�GHq�e�e#�e���\�Z$�Z%�e$�sUd*�Ge#�GHq�d+�Ge$�Gd,�Ge%�GHq�Wn��d�S(1���s���Guess the MIME type of a file. This module defines two useful functions: guess_type(url, strict=1) -- guess the MIME type and encoding of a URL. guess_extension(type, strict=1) -- guess the extension for a given MIME type. It also contains the following, for tuning the behavior: Data: knownfiles -- list of files to parse inited -- flag set when init() has been called suffix_map -- dictionary mapping suffixes to suffixes encodings_map -- dictionary mapping suffixes to encodings types_map -- dictionary mapping suffixes to types Functions: init([files]) -- parse a list of files, default knownfiles (on Windows, the default values are taken from the registry) read_mime_types(file) -- parse one file, return a dictionary or None i����Nt ���guess_typet���guess_extensiont���guess_all_extensionst���add_typet���read_mime_typest���inits���/etc/mime.typess���/etc/httpd/mime.typess���/etc/httpd/conf/mime.typess���/etc/apache/mime.typess���/etc/apache2/mime.typess$���/usr/local/etc/httpd/conf/mime.typess"���/usr/local/lib/netscape/mime.typess���/usr/local/etc/mime.typest ���MimeTypesc�����������B���sq���e��Z�d��Z�d �e�d���Z�e�d���Z�e�d���Z�e�d���Z�e�d���Z�e�d���Z �e�d���Z �e�d���Z�RS( ���s����MIME-types datastore. This datastore can handle information from mime.types-style files and supports basic determination of MIME type from a filename or URL, and can guess a reasonable extension given a MIME type. c���������C���s����t��s�t����n��t�j����|��_�t�j����|��_�i��i��f�|��_�i��i��f�|��_�x-�t�j����D]�\�}�}�|��j�|�|�t ���qY�Wx-�t �j����D]�\�}�}�|��j�|�|�t���q��Wx�|�D]�}�|��j�|�|���q��Wd��S(���N( ���t���initedR���t ���encodings_mapt���copyt ���suffix_mapt ���types_mapt ���types_map_invt���itemsR���t���Truet���common_typest���Falset���read(���t���selft ���filenamest���strictt���extt���typet���name(����(����s!���/usr/lib64/python2.7/mimetypes.pyt���__init__@���s���� c���������C���sJ���|�|��j��|�|�<|��j�|�j�|�g����}�|�|�k�rF�|�j�|���n��d�S(���s���Add a mapping between a type and an extension. When the extension is already known, the new type will replace the old one. When the type is already known the extension will be added to the list of known extensions. If strict is true, information will be added to list of standard types, else to the list of non-standard types. N(���R���R���t ���setdefaultt���append(���R���R���R���R���t���exts(����(����s!���/usr/lib64/python2.7/mimetypes.pyR���N���s����c���������C���s���t��j�|���\�}�}�|�d�k�r��|�j�d���}�|�d�k��r@�d �S|�j�d�d�|���}�|�d�k�rn�|�|� }�n �|�|� }�d�|�k�s��d�|�k�r��d�}�n��|�d�f�St�j�|���\�}�}�x3�|�|��j�k�r��t�j�|�|��j�|���\�}�}�q��W|�|��j�k�r"|��j�|�} �t�j�|���\�}�}�n�d�} �|��j�t �} �|�| �k�rO| �|�| �f�S|�j ����| �k�ru| �|�j ����| �f�S|�r�d�| �f�S|��j�t�} �|�| �k�r�| �|�| �f�S|�j ����| �k�r�| �|�j ����| �f�Sd�| �f�Sd�S( ���s:��Guess the type of a file based on its URL. Return value is a tuple (type, encoding) where type is None if the type can't be guessed (no or unknown suffix) or a string of the form type/subtype, usable for a MIME Content-type header; and encoding is None for no encoding or the name of the program used to encode (e.g. compress or gzip). The mappings are table driven. Encoding suffixes are case sensitive; type suffixes are first tried case sensitive, then case insensitive. The suffixes .tgz, .taz and .tz (case sensitive!) are all mapped to '.tar.gz'. (This is table-driven too, using the dictionary suffix_map.) Optional `strict' argument when False adds a bunch of commonly found, but non-standard types. t���datat���,i����t���;t���=t���/s ���text/plainN(���NN(���t���urllibt ���splittypet���findt���Nonet ���posixpatht���splitextR ���R���R���R���t���lowerR���(���R���t���urlR���t���schemet���commat���semiR���t���baseR���t���encodingR���(����(����s!���/usr/lib64/python2.7/mimetypes.pyR����_���s@���� $ c���������C���sr���|�j�����}�|��j�t�j�|�g����}�|�sn�x@�|��j�t�j�|�g����D]"�}�|�|�k�rE�|�j�|���qE�qE�Wn��|�S(���s���Guess the extensions for a file based on its MIME type. Return value is a list of strings giving the possible filename extensions, including the leading dot ('.'). The extension is not guaranteed to have been associated with any particular data stream, but would be mapped to the MIME type `type' by guess_type(). Optional `strict' argument when false adds a bunch of commonly found, but non-standard types. (���R'���R���R���t���getR���R���(���R���R���R���t ���extensionsR���(����(����s!���/usr/lib64/python2.7/mimetypes.pyR�������s���� c���������C���s$���|��j��|�|���}�|�s�d�S|�d�S(���s��Guess the extension for a file based on its MIME type. Return value is a string giving a filename extension, including the leading dot ('.'). The extension is not guaranteed to have been associated with any particular data stream, but would be mapped to the MIME type `type' by guess_type(). If no extension can be guessed for `type', None is returned. Optional `strict' argument when false adds a bunch of commonly found, but non-standard types. i����N(���R���R$���(���R���R���R���R/���(����(����s!���/usr/lib64/python2.7/mimetypes.pyR�������s���� c���������C���s)���t��|�����}�|��j�|�|���Wd�QXd�S(���s���� Read a single mime.types-format file, specified by pathname. If strict is true, information will be added to list of standard types, else to the list of non-standard types. N(���t���opent���readfp(���R���t���filenameR���t���fp(����(����s!���/usr/lib64/python2.7/mimetypes.pyR�������s����c��� ������C���s����x��|�j�����}�|�s�Pn��|�j����}�x9�t�t�|�����D]%�}�|�|�d�d�k�r8�|�|�3Pq8�q8�W|�sm�q�n��|�d�|�d�}�}�x%�|�D]�}�|��j�|�d�|�|���q��Wq�Wd�S(���s���� Read a single mime.types-format file. If strict is true, information will be added to list of standard types, else to the list of non-standard types. i����t���#i���t���.N(���t���readlinet���splitt���ranget���lenR���( ���R���R3���R���t���linet���wordst���iR���t���suffixest���suff(����(����s!���/usr/lib64/python2.7/mimetypes.pyR1�������s���� c��� ������C���s ��t��s �d�Sd����}�t�j����}�t��j�t��j�d������}�x��|�|���D]��}�y��t��j�|�|������}�|�j�d���sw�wD�n��t��j�|�d���\�}�}�|�t��j�k�r��wD�n��y�|�j�|���}�Wn�t �k �r��wD�n�X|��j �|�|�|���Wd�QXWqD�t�k �r��qD�qD�XqD�WWd�QXd�S(���s���� Load the MIME types database from Windows registry. If strict is true, information will be added to list of standard types, else to the list of non-standard types. Nc���������s���s`���d�}�xS�t��r[�y�t�j�|��|���}�Wn�t�k �r9�Pn�Xd�|�k�rN�|�Vn��|�d�7}�q �Wd��S(���Ni����s����i���(���R���t���_winregt���EnumKeyt���EnvironmentError(���t���mimedbR<���t���ctype(����(����s!���/usr/lib64/python2.7/mimetypes.pyt ���enum_types����s���� t����R5���s���Content Type(���R?���t���syst���getdefaultencodingt���OpenKeyt���HKEY_CLASSES_ROOTt ���startswitht���QueryValueExt���REG_SZt���encodet���UnicodeEncodeErrorR���RA���( ���R���R���RD���t���default_encodingt���hkcrt ���subkeynamet���subkeyt���mimetypet���datatype(����(����s!���/usr/lib64/python2.7/mimetypes.pyt���read_windows_registry����s*���� (����(���t���__name__t ���__module__t���__doc__R���R���R���R����R���R���R���R1���RU���(����(����(����s!���/usr/lib64/python2.7/mimetypes.pyR���8���s���>c���������C���s&���t��d�k�r�t����n��t��j�|��|���S(���s���Guess the type of a file based on its URL. Return value is a tuple (type, encoding) where type is None if the type can't be guessed (no or unknown suffix) or a string of the form type/subtype, usable for a MIME Content-type header; and encoding is None for no encoding or the name of the program used to encode (e.g. compress or gzip). The mappings are table driven. Encoding suffixes are case sensitive; type suffixes are first tried case sensitive, then case insensitive. The suffixes .tgz, .taz and .tz (case sensitive!) are all mapped to ".tar.gz". (This is table-driven too, using the dictionary suffix_map). Optional `strict' argument when false adds a bunch of commonly found, but non-standard types. N(���t���_dbR$���R���R����(���R(���R���(����(����s!���/usr/lib64/python2.7/mimetypes.pyR������s���� c���������C���s&���t��d�k�r�t����n��t��j�|��|���S(���s���Guess the extensions for a file based on its MIME type. Return value is a list of strings giving the possible filename extensions, including the leading dot ('.'). The extension is not guaranteed to have been associated with any particular data stream, but would be mapped to the MIME type `type' by guess_type(). If no extension can be guessed for `type', None is returned. Optional `strict' argument when false adds a bunch of commonly found, but non-standard types. N(���RY���R$���R���R���(���R���R���(����(����s!���/usr/lib64/python2.7/mimetypes.pyR���)��s���� c���������C���s&���t��d�k�r�t����n��t��j�|��|���S(���s���Guess the extension for a file based on its MIME type. Return value is a string giving a filename extension, including the leading dot ('.'). The extension is not guaranteed to have been associated with any particular data stream, but would be mapped to the MIME type `type' by guess_type(). If no extension can be guessed for `type', None is returned. Optional `strict' argument when false adds a bunch of commonly found, but non-standard types. N(���RY���R$���R���R���(���R���R���(����(����s!���/usr/lib64/python2.7/mimetypes.pyR���:��s���� c���������C���s)���t��d�k�r�t����n��t��j�|��|�|���S(���si��Add a mapping between a type and an extension. When the extension is already known, the new type will replace the old one. When the type is already known the extension will be added to the list of known extensions. If strict is true, information will be added to list of standard types, else to the list of non-standard types. N(���RY���R$���R���R���(���R���R���R���(����(����s!���/usr/lib64/python2.7/mimetypes.pyR���J��s���� c���������C���s����t��a�t����}�|��d��k�r7�t�r.�|�j����n��t�}��n��x0�|��D](�}�t�j�j �|���r>�|�j �|���q>�q>�W|�j�a�|�j�a�|�j �t��a �|�j �t�a�|�a�d��S(���N(���R���R���R���R$���R?���RU���t ���knownfilest���ost���patht���isfileR���R���R ���R���R���R���RY���(���t���filest���dbt���file(����(����s!���/usr/lib64/python2.7/mimetypes.pyR���[��s���� c���������C���sZ���y�t��|����}�Wn�t�k �r$�d��SX|��)�t����}�|�j�|�t���|�j�t�SWd��QXd��S(���N(���R0���t���IOErrorR$���R���R1���R���R���(���R`���t���fR_���(����(����s!���/usr/lib64/python2.7/mimetypes.pyR���o��s���� c�����������C���s��i�d�d�6d�d�6d�d�6d�d�6d�d�6d �d �6a��i�d�d�6d �d�6d�d�6d�d�6a�i��d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d �6d!�d"�6d�d#�6d$�d%�6d�d&�6d'�d(�6d)�d(�6d*�d+�6d,�d-�6d.�d/�6d0�d1�6d�d2�6d3�d4�6d3�d5�6d6�d7�6d8�d9�6d�d:�6d;�d<�6d�d=�6d>�d?�6d@�dA�6d�dB�6dC�dD�6dE�dF�6dE�dG�6dH�dI�6dJ�dK�6dL�dM�6dL�dN�6dL�dO�6dP�dQ�6dR�dS�6d�dT�6dU�dV�6dW�dX�6dY�dZ�6d[�d\�6d8�d]�6d8�d^�6d_�d`�6dP�da�6db�dc�6dd�de�6df�dg�6df�dh�6di�dj�6dW�dk�6dW�dl�6dW�dm�6dW�dn�6do�dp�6d)�dq�6d8�dr�6d�ds�6d�dt�6du�dv�6dw�dx�6dy�dz�6d{�d|�6d}�d~�6dw�d�6d��d��6d�d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d�d��6d��d��6d��d��6d��d��6d��d��6db�d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d�d��6d�d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d�d��6d��d��6d��d��6d��d��6d��d��6d3�d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6a�i�d��dO�6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6d��d��6a�d��S(����Ns���.svg.gzs���.svgzs���.tar.gzs���.tgzs���.tazs���.tzs���.tar.bz2s���.tbz2s���.tar.xzs���.txzt���gzips���.gzt���compresss���.Zt���bzip2s���.bz2t���xzs���.xzs���application/octet-streams���.as���application/postscripts���.ais���audio/x-aiffs���.aifs���.aifcs���.aiffs���audio/basics���.aus���video/x-msvideos���.avis ���text/plains���.bats���application/x-bcpios���.bcpios���.bins���image/x-ms-bmps���.bmps���.cs���application/x-cdfs���.cdfs���application/x-netcdfs���application/x-cpios���.cpios���application/x-cshs���.cshs���text/csss���.csss���text/csvs���.csvs���.dlls���application/mswords���.docs���.dots���application/x-dvis���.dvis���message/rfc822s���.emls���.epss ���text/x-setexts���.etxs���.exes ���image/gifs���.gifs���application/x-gtars���.gtars���.hs���application/x-hdfs���.hdfs ���text/htmls���.htms���.htmls���image/vnd.microsoft.icons���.icos ���image/iefs���.iefs ���image/jpegs���.jpes���.jpegs���.jpgs���application/javascripts���.jss���application/jsons���.jsons���.kshs���application/x-latexs���.latexs ���video/mpegs���.m1vs���application/x-troff-mans���.mans���application/x-troff-mes���.mes���.mhts���.mhtmls���application/x-mifs���.mifs���.mjss���video/quicktimes���.movs���video/x-sgi-movies���.movies ���audio/mpegs���.mp2s���.mp3s ���video/mp4s���.mp4s���.mpas���.mpes���.mpegs���.mpgs���application/x-troff-mss���.mss���.ncs���.nwss���.os���.objs���application/odas���.odas���application/x-pkcs12s���.p12s���application/pkcs7-mimes���.p7cs���image/x-portable-bitmaps���.pbms���application/pdfs���.pdfs���.pfxs���image/x-portable-graymaps���.pgms���.pls ���image/pngs���.pngs���image/x-portable-anymaps���.pnms���application/vnd.ms-powerpoints���.pots���.ppas���image/x-portable-pixmaps���.ppms���.ppss���.ppts���.pss���.pwzs ���text/x-pythons���.pys���application/x-python-codes���.pycs���.pyos���.qts���audio/x-pn-realaudios���.ras���application/x-pn-realaudios���.rams���image/x-cmu-rasters���.rass���application/xmls���.rdfs���image/x-rgbs���.rgbs���application/x-troffs���.roffs ���text/richtexts���.rtxs���text/x-sgmls���.sgms���.sgmls���application/x-shs���.shs���application/x-shars���.shars���.snds���.sos���application/x-wais-sources���.srcs���application/x-sv4cpios���.sv4cpios���application/x-sv4crcs���.sv4crcs ���image/svg+xmls���.svgs���application/x-shockwave-flashs���.swfs���.ts���application/x-tars���.tars���application/x-tcls���.tcls���application/x-texs���.texs���application/x-texinfos���.texis���.texinfos ���image/tiffs���.tifs���.tiffs���.trs���text/tab-separated-valuess���.tsvs���.txts���application/x-ustars���.ustars���text/x-vcards���.vcfs���audio/x-wavs���.wavs ���video/webms���.webms���.wizs���.wsdls���image/x-xbitmaps���.xbms���application/vnd.ms-excels���.xlbs���application/excels���.xlss���text/xmls���.xmls���.xpdls���image/x-xpixmaps���.xpms���.xsls���image/x-xwindowdumps���.xwds���application/zips���.zips ���image/jpgs ���audio/midis���.mids���.midis ���image/picts���.pcts���.pics���.picts���application/rtfs���.rtfs���text/xuls���.xul(���R ���R���R���R���(����(����(����s!���/usr/lib64/python2.7/mimetypes.pyt���_default_mime_typesz��s,��� t���__main__s4��Usage: mimetypes.py [options] type Options: --help / -h -- print this message and exit --lenient / -l -- additionally search of some common, but non-standard types. --extension / -e -- guess extension instead of type More than one type argument may be given. RE���c���������C���s$���t��GH|�r�|�GHn��t�j�|����d��S(���N(���t���USAGERF���t���exit(���t���codet���msg(����(����s!���/usr/lib64/python2.7/mimetypes.pyt���usage<��s�����i���t���hlet���helpt���lenientt ���extensioni����s���-hs���--helps���-ls ���--lenients���-es���--extensions ���I don't know anything about types���type:s ���encoding:(����(���s���-hs���--help(���s���-ls ���--lenient(���s���-es���--extension(&���RX���R[���RF���R%���R!���R?���t���ImportErrorR$���t���__all__RZ���R���R���RY���R���R���R����R���R���R���R���R���Rg���RV���t���getoptRi���Rm���t���argvt���optst���argst���errorRl���R���Rq���t���optt���argt���gtypet���guessR-���(����(����(����s!���/usr/lib64/python2.7/mimetypes.pyt���<module>���st��� � � ��