Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
Disable Function : NONE
Directory :  /lib/python3/dist-packages/magic/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

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

�ܸ` �@s�dZddlZddlmZddlTddlmZddlmZiZe�	�ed<dZ
ZdZZ
d	ZZd
ZZdZZdZZd
ZZdZZdZZdZZdZZdZ Z!dZ"Z#dZ$Z%dZ&Z'dZ(Z)dZ*Z+dZ,Z-dZ.Z/dZ0Z1dZ2Z3dZ4Z5dZ6Z7dZ8Z9edd �Z:Gd!d"�d"e;�Z<ge<_=e>e<�Z?edj@ZAe?eA_BeCgeA_DedjEZFdeF_Be?geF_DedjGZHeIeH_Be?eIgeH_DedjJZKeIeK_Be?eCgeK_DedjLZMeIeM_Be?eNeOgeM_DedjPZQeIeQ_Be?geQ_DedjRZSeCeS_Be?eCgeS_DedjTZUeCeU_Be?eIgeU_DedjVZWeCeW_Be?eIgeW_DedjXZYeCeY_Be?eIgeY_DedjZZ[eCe[_Be?eIge[_Dedj\Z]eCe]_Be?ge]_DGd#d$�d$e^�Z_d%d&�Z`e_eAe"��Zaea�b�e_eAe
��Zcec�b�d'd(�Zdd)d*�Zed+d,�Zfd-d.�ZgdS)/z
Python bindings for libmagic
�N)�
namedtuple)�*)�find_library�)�loader�magic����� �@��iiiiii i@i�iiiii i�?�	FileMagic)�	mime_type�encoding�namec@seZdZdS)�	magic_setN)�__name__�
__module__�__qualname__�rr�./usr/lib/python3/dist-packages/magic/compat.pyr3src@s�eZdZdd�Zdd�Zedd��Zedd��Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zddd�Z
dd�Zdd�Zdd�Zdd�ZdS)�MagiccCs
||_dS�N)�_magic_t)�self�msrrr�__init__ls
zMagic.__init__cCst|j�dS)zO
        Closes the magic database and deallocates any resources used.
        N)�_closer�rrrr�closeoszMagic.closecC�B|durdSt|t�r
|Szt|d�WSty t|�YSw�Nzutf-8)�
isinstance�str�	TypeError)�srrr�__tostru�
�z
Magic.__tostrcCr#r$)r%�bytesr')�brrr�	__tobytes�r*zMagic.__tobytescCst�t|jt�|���S)z�
        Returns a textual description of the contents of the argument passed
        as a filename or None if an error occurred and the MAGIC_ERROR flag
        is set. A call to errno() will return the numeric error code.
        )r�
_Magic__tostr�_filer�_Magic__tobytes�r�filenamerrr�file��z
Magic.filecCst�t|j|��S)z�
        Returns a textual description of the contents of the argument passed
        as a file descriptor or None if an error occurred and the MAGIC_ERROR
        flag is set. A call to errno() will return the numeric error code.
        )rr.�_descriptorr)r�fdrrr�
descriptor�szMagic.descriptorcCst�t|j|t|���S)z�
        Returns a textual description of the contents of the argument passed
        as a buffer or None if an error occurred and the MAGIC_ERROR flag
        is set. A call to errno() will return the numeric error code.
        )rr.�_bufferr�len)r�bufrrr�buffer�r4zMagic.buffercCst�t|j��S)zh
        Returns a textual explanation of the last error or None
        if there was no error.
        )rr.�_errorrr!rrr�error�szMagic.errorcCst|j|�S)a*
        Set flags on the magic object which determine how magic checking
        behaves; a bitwise OR of the flags described in libmagic(3), but
        without the MAGIC_ prefix.

        Returns -1 on systems that don't support utime(2) or utimes(2)
        when PRESERVE_ATIME is set.
        )�	_setflagsr)r�flagsrrr�setflags�s	zMagic.setflagsNcC�t|jt�|��S)a	
        Must be called to load entries in the colon separated list of database
        files passed as argument or the default database file if no argument
        before any magic queries can be performed.

        Returns 0 on success and -1 on failure.
        )�_loadrrr0r1rrr�load��z
Magic.loadcCrA)aD
        Compile entries in the colon separated list of database files
        passed as argument or the default database file if no argument.
        The compiled files created are named from the basename(1) of each file
        argument with ".mgc" appended to it.

        Returns 0 on success and -1 on failure.
        )�_compilerrr0�r�dbsrrr�compile�s	z
Magic.compilecCrA�z�
        Check the validity of entries in the colon separated list of
        database files passed as argument or the default database file
        if no argument.

        Returns 0 on success and -1 on failure.
        )�_checkrrr0rFrrr�check�rDzMagic.checkcCrArI)�_listrrr0rFrrr�list�rDz
Magic.listcCs
t|j�S)a
        Returns a numeric error code. If return value is 0, an internal
        magic error occurred. If return value is non-zero, the value is
        an OS error code. Use the errno module or os.strerror() can be used
        to provide detailed error information.
        )�_errnorr!rrr�errno�s
zMagic.errnor)rrrrr"�staticmethodr.r0r3r7r;r=r@rCrHrKrMrOrrrrrks"







rcCstt|��S)zd
    Returns a magic object on success and None on failure.
    Flags argument as for setflags.
    )r�_open)r?rrr�open�srRcCs$|�d�\}}t|||�dd�d�S)Nz; zcharset=�)rrr)�splitr�replace)�
mime_detected�
type_detectedr�
mime_encodingrrr�_create_filemagic�s
�rYcC�tt�|�t�|��S)zdDetect mime type, encoding and file type from a filename

    Returns a `FileMagic` namedtuple.
    )rY�
mime_magicr3�
none_magic)r2rrr�detect_from_filename��
�r]cCs|��}tt�|�t�|��S)zjDetect mime type, encoding and file type from file-like object

    Returns a `FileMagic` namedtuple.
    )�filenorYr[r7r\)�fobj�file_descriptorrrr�detect_from_fobjs
�rbcCrZ)z_Detect mime type, encoding and file type from bytes

    Returns a `FileMagic` namedtuple.
    )rYr[r;r\)�byte_contentrrr�detect_from_contentr^rd)h�__doc__�ctypes�collectionsr�ctypes.utilrrSr�
_libraries�load_lib�
MAGIC_NONE�NONE�MAGIC_DEBUG�DEBUG�
MAGIC_SYMLINK�SYMLINK�MAGIC_COMPRESS�COMPRESS�
MAGIC_DEVICES�DEVICES�MAGIC_MIME_TYPE�	MIME_TYPE�MAGIC_CONTINUE�CONTINUE�MAGIC_CHECK�CHECK�MAGIC_PRESERVE_ATIME�PRESERVE_ATIME�	MAGIC_RAW�RAW�MAGIC_ERROR�ERROR�MAGIC_MIME_ENCODING�
MIME_ENCODING�
MAGIC_MIME�MIME�MAGIC_APPLE�APPLE�MAGIC_NO_CHECK_COMPRESS�NO_CHECK_COMPRESS�MAGIC_NO_CHECK_TAR�NO_CHECK_TAR�MAGIC_NO_CHECK_SOFT�
NO_CHECK_SOFT�MAGIC_NO_CHECK_APPTYPE�NO_CHECK_APPTYPE�MAGIC_NO_CHECK_ELF�NO_CHECK_ELF�MAGIC_NO_CHECK_TEXT�
NO_CHECK_TEXT�MAGIC_NO_CHECK_CDF�NO_CHECK_CDF�MAGIC_NO_CHECK_TOKENS�NO_CHECK_TOKENS�MAGIC_NO_CHECK_ENCODING�NO_CHECK_ENCODING�MAGIC_NO_CHECK_BUILTIN�NO_CHECK_BUILTINr�	Structurer�_fields_�POINTER�magic_t�
magic_openrQ�restype�c_int�argtypes�magic_closer �
magic_filer/�c_char_p�magic_descriptorr5�magic_bufferr8�c_void_p�c_size_t�magic_errorr<�magic_setflagsr>�
magic_loadrB�
magic_compilerE�magic_checkrJ�
magic_listrL�magic_errnorN�objectrrRr[rCr\rYr]rbrdrrrr�<module>s�



















}	


Spamworldpro Mini