403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/django/core/files/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/django/core/files/__pycache__/locks.cpython-311.pyc
�

�|�e�
��0�dZddlZdZd�Zejdkr�ddlZddlmZmZm	Z	m
Z
mZmZm
Z
mZmZddlmZmZmZdZdZd	Zee��ee
��kreZneZe
ZGd
�de��ZGd�d
e	��ZGd�de��Zee��ZejjZee_eeeeeege_ ejj!Z!ee!_eeeeege!_ d�Z"d�Z#dS	ddl$Z$e$jZe$jZe$jZd�Z"d�Z#dS#e%e&f$rdxZxZZd�Z"d�Z#YdSwxYw)aw
Portable file locking utilities.

Based partially on an example by Jonathan Feignberg in the Python
Cookbook [1] (licensed under the Python Software License) and a ctypes port by
Anatoly Techtonik for Roundup [2] (license [3]).

[1] http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65203
[2] https://sourceforge.net/p/roundup/code/ci/default/tree/roundup/backends/portalocker.py
[3] https://sourceforge.net/p/roundup/code/ci/default/tree/COPYING.txt

Example Usage::

    >>> from django.core.files import locks
    >>> with open('./file', 'wb') as f:
    ...     locks.lock(f, locks.LOCK_EX)
    ...     f.write('Django')
�N)�LOCK_EX�LOCK_SH�LOCK_NB�lock�unlockc�N�t|d��r|���n|S)zCGet a filedescriptor from something which could be a file or an fd.�fileno)�hasattrr	��fs �9/usr/lib/python3/dist-packages/django/core/files/locks.py�_fdrs#�� ��H�-�-�4�1�8�8�:�:�:�1�4��nt)	�POINTER�	Structure�Union�byref�c_int64�c_ulong�c_void_p�sizeof�windll)�BOOL�DWORD�HANDLE��c��eZdZdefdefgZdS)�_OFFSET�Offset�
OffsetHighN)�__name__�
__module__�__qualname__r�_fields_�rr
r r 2s%������
�u��
�5�!�#���rr c�$�eZdZdgZdefdefgZdS)�
_OFFSET_UNION�_offset�PointerN)r#r$r%�_anonymous_r �PVOIDr&r'rr
r)r)7s,������ �k��
�� �
��� ���rr)c�0�eZdZdgZdefdefdefdefgZdS)�
OVERLAPPED�
_offset_union�Internal�InternalHigh�hEventN)r#r$r%r,�	ULONG_PTRr)rr&r'rr
r/r/=s=������&�'��
��#�
�Y�'�
�m�,�
�v��	 ���rr/c
��tjt|����}t��}t	||dddt|����}t
|��S�Nrl�)�msvcrt�
get_osfhandlerr/�
LockFileExr�bool)r�flags�hfile�
overlapped�rets     r
rrOsL���$�S��V�V�,�,���\�\�
����q�!�Z��z�9J�9J�K�K���C�y�y�rc	��tjt|����}t��}t	|dddt|����}t
|��Sr6)r7r8rr/�UnlockFileExrr:)rr<r=r>s    r
rrUsJ���$�S��V�V�,�,���\�\�
��5�!�Q�
�E�*�4E�4E�F�F���C�y�y�rc�n�	tjt|��|��dS#t$rYdSwxYw)NTF)�fcntl�flockr�BlockingIOError�rr;s  r
rrmsF��
���C��F�F�E�*�*�*��t��"�
�
�
��u�u�
���s�"&�
4�4c�^�tjt|��tj��dS�NT)rBrCr�LOCK_UNrs r
rrts!���K��A����
�.�.�.��4rc��dS)NFr'rEs  r
rres���5rc��dSrGr'rs r
rris���4r)'�__doc__�os�__all__r�namer7�ctypesrrrrrrrrr�ctypes.wintypesrrrrrrr4r-r r)r/�LPOVERLAPPED�kernel32r9�restype�argtypesr@rrrB�ImportError�AttributeErrorr'rr
�<module>rWs�����$
�	�	�	�
=��5�5�5�
�7�d�?�?��M�M�M�����������������������4�3�3�3�3�3�3�3�3�3��G��G��G��v�g���&�&��*�*�*�*��	�	��	��E�#�#�#�#�#�)�#�#�#�
 � � � � �� � � � � � � � �Y� � � ��7�:�&�&�L���+�J��J��!�5�%���|�L�J���?�/�L��L��#�U�E�5�,�G�L����������������-���-���-��	�	�	�	�	�	�	�	��)
��(����&'�'��'�'�G�	�	�	�	�	�	�	�	�	����s�C>�>D�D

Youez - 2016 - github.com/yon3zu
LinuXploit