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/werkzeug/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/werkzeug/__pycache__/_reloader.cpython-311.pyc
�

��b�7�
�>�UddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZddlm
Z
eejejh��Zhe�ej�ej�Zeed��re�ej��ee��Z[hd�Zdejefd	�Zd
ejedejeddfd�Zd
ejedejedejefd�Zd
ejedejedejefd�Z d
ejedejefd�Z!dej"efd�Z#Gd�d��Z$Gd�de$��Z%Gd�de$��Z&e%e&d�Z'ej(eej)e$fe*d<	e+d��e'de'd<n#e,$re'de'd<YnwxYwd#d�Z-				d$dej.gdfd
ej/ejedej/ejed ej0e1e2fd!eddfd"�Z3dS)%�N)�chain)�PurePath�)�_log�real_prefix>�.hg�.git�.nox�.tox�.mypy_cache�
.pytest_cache�__pycache__�returnc#�K�ttj�����D]�}t	|dd��}|�|�t��r�0tj�	|��sG|}tj�
|��}||krn#tj�	|���G|V���dS)z;Find the filesystem paths associated with imported modules.�__file__N)�list�sys�modules�values�getattr�
startswith�_ignore_always�os�path�isfile�dirname)�module�name�olds   �4/usr/lib/python3/dist-packages/werkzeug/_reloader.py�_iter_module_pathsr!&s������s�{�)�)�+�+�,�,�����v�z�4�0�0���<�4�?�?�>�:�:�<���'�.�.��&�&�	��C��7�?�?�4�(�(�D��s�{�{��
�'�.�.��&�&�	��J�J�J�����paths�exclude_patternsc�`�|D]*}|�tj||�����+dS�N)�difference_update�fnmatch�filter)r#r$�patterns   r �_remove_by_patternr+:sB��#�@�@��
�����u�g� >� >�?�?�?�?�@�@r"�extra_filesc	���t��}tttj��|��D�]z}t
j�|��}t
j�|��r|�|���Wt
j�	|��di}tj
|��D]�\}}}|�t��s&t
j�
|��tvr|����[d}|D]L}	|	�d��r5d}|�t
j�||	�����M|s:|t
j�	|��s|�����|||<���||�t'����t)||��|S)axFind paths for the stat reloader to watch. Returns imported
    module files, Python files under non-system paths. Extra files and
    Python files under extra directories can also be scanned.

    System paths have to be excluded for efficiency. Non-system paths,
    such as a project root or ``sys.path.insert``, should be the paths
    of interest to the user anyway.
    TF)z.pyz.pyc)�setrrrrr�abspathr�addr�walkr�_stat_ignore_scan�basename�_ignore_common_dirs�clear�endswith�join�updater!r+)
r,r$r#r�
parent_has_py�root�dirs�files�has_pyrs
          r �_find_stat_pathsr>?s���
�E�E�E��d�3�8�n�n�k�2�2�")�")���w���t�$�$��
�7�>�>�$���	��I�I�d�O�O�O�������.�.��5�
�!#�����	)�	)��D�$��
��� 1�2�2�
��7�#�#�D�)�)�-@�@�@��
�
������F��
8�
8���=�=��1�1�8�!�F��I�I�b�g�l�l�4��6�6�7�7�7���
�m�B�G�O�O�D�,A�,A�B�
��
�
�����"(�M�$���1	)�4
�L�L�#�%�%�&�&�&��u�.�/�/�/��Lr"c��t��}tttj��|��D]t}t
j�|��}t
j�|��rt
j�|��}|�	|���ut��D]4}|�	t
j�|�����5t||��t|��S)z�Find paths for the stat reloader to watch. Looks at the same
    sources as the stat reloader, but watches everything under
    directories instead of individual files.
    )
r.rrrrrr/rrr0r!r+�_find_common_roots)r,r$r;rs    r �_find_watchdog_pathsrAus����5�5�D��d�3�8�n�n�k�2�2�����w���t�$�$��
�7�>�>�$���	)��7�?�?�4�(�(�D���������"�$�$�(�(����������&�&�'�'�'�'��t�-�.�.�.��d�#�#�#r"c�l���i}td�|D��td���D]3}|}|D]}|�|i��}�|����4t	���dt
jttfdt
j	tdfddf��fd���|d	���S)
Nc3�>K�|]}t|��jV��dSr&)r�parts��.0�xs  r �	<genexpr>z%_find_common_roots.<locals>.<genexpr>�s+����;�;��(�1�+�+�+�;�;�;�;�;�;r"T)�key�reverse�noder.rc���|���D]\}}�|||fz���|s(��tjj|���dSdSr&)�itemsr0rrr7)rKr�prefix�child�_walk�rvs    ��r rPz!_find_common_roots.<locals>._walk�sm���!�Z�Z�\�\�	+�	+�M�F�E��E�%���	�)�*�*�*�*��	(��F�F�2�7�<��&�'�'�'�'�'�	(�	(r"�)
�sorted�len�
setdefaultr5r.�t�Mapping�str�dict�Tuple)r#r:�chunksrK�chunkrPrQs     @@r r@r@�s����� �D��;�;�U�;�;�;��d�S�S�S�������	.�	.�E��?�?�5�"�-�-�D�D��
�
�����	���B�(�A�I�c�4�i�(�(����S��0A�(�d�(�(�(�(�(�(�(�
�E�$��O�O�O�
�Ir"c��tjg}tjd}tjdd�}tjd}t	|dd���_t
jdk�rJ|jdk�r>t
j�	|���st
j�	|�d���r�t
j�
|��}t
jdkr�t
j�	|��s't
j�	|�d���r|dz
}t
j�tj��ddkr>t
j�|��ddkr|�d��|�
|��n�t
j�|��rptjt"|j��}t
j�t
j�|����d}|dkr|d	|��z
}n|}|�d
|�d	��f��|�|��|S)zpDetermine how the script was executed, and return the args needed
    to execute it again in a new process.
    rrN�__main__�__package__�nt�z.exe�.z-m)r�
executable�argvrrrrr_r�existsr/�splitext�pop�appendrrV�castrXr3�extend�lstrip)rQ�	py_script�argsr^�	py_modulers      r �_get_args_for_reloadingro�s���.�	�B�����I��8�A�B�B�<�D��{�:�&�H�
�x���-�-�5�
��4���� �B�&�&�����y�)�)�
'��G�N�N�i�-�-�-�.�.�
'�
�G�O�O�I�.�.�	�
�7�d�?�?��7�>�>�)�,�,�
$�����9�@R�@R�@R�1S�1S�
$��V�#�	��� � ���0�0��3�v�=�=��G�$�$�Y�/�/��2�f�<�<����q�	�	�	�
�	�	�)������7�>�>�)�$�$�		"���s�H�$8�9�9�I��7�#�#�B�G�$4�$4�Y�$?�$?�@�@��C�D��z�!�!��Z��Z�Z�'�	��"�I�
�	�	�4��)�)�#�.�.�/�0�0�0��I�I�d�O�O�O�
�Ir"c	���eZdZdZ			ddejejedejejedeje	e
fddfd�Zdd	�Zd
�Z
dd�Zdd�Zde	fd
�Zdeddfd�Zdeddfd�ZdS)�ReloaderLoopraNrr,r$�intervalrc�f�d�|pdD��|_t|pd��|_||_dS)Nc�L�h|]!}tj�|����"SrR)rrr/rEs  r �	<setcomp>z(ReloaderLoop.__init__.<locals>.<setcomp>�s&��'V�'V�'V�q������(:�(:�'V�'V�'Vr"rR)r,r.r$rr)�selfr,r$rrs    r �__init__zReloaderLoop.__init__�sB��(W�'V�K�DU�SU�'V�'V�'V���,/�0@�0F�B�,G�,G��� ��
�
�
r"c�.�|���|S)zgDo any setup, then run one step of the watch to populate the
        initial filesystem state.
        )�run_step�rvs r �	__enter__zReloaderLoop.__enter__�s��	
�
�
�����r"c��dS)z4Clean up any resources associated with the reloader.NrR�rv�exc_type�exc_val�exc_tbs    r �__exit__zReloaderLoop.__exit__�s���r"c�`�	|���tj|j���.)zfContinually run the watch step, sleeping for the configured
        interval after each step.
        )ry�time�sleeprrrzs r �runzReloaderLoop.run�s+��	&��M�M�O�O�O��J�t�}�%�%�%�	&r"c��dS)z}Run one step for watching the filesystem. Called once to set
        up initial state, then repeatedly to update it.
        NrRrzs r ryzReloaderLoop.run_step�s	��	
�r"c���	tdd|j����t��}tj���}d|d<t
j||d���}|dkr|S�i)	z|Spawn a new Python interpreter with the same arguments as the
        current one, but running the reloader thread.
        T�infoz * Restarting with �true�WERKZEUG_RUN_MAINF)�env�	close_fds�)rrror�environ�copy�
subprocess�call)rvrm�new_environ�	exit_codes    r �restart_with_reloaderz"ReloaderLoop.restart_with_reloaderss��	!���:�t�y�:�:�;�;�;�*�,�,�D��*�/�/�+�+�K�/5�K�+�,�"���+��O�O�O�I��A�~�~� � �	!r"�filenamec�X�|�|��tjd��dS�Nr�)�
log_reloadr�exit�rvr�s  r �trigger_reloadzReloaderLoop.trigger_reloads%������!�!�!��������r"c�l�tj�|��}tdd|�d���dS)Nr�z * Detected change in z, reloading)rrr/rr�s  r r�zReloaderLoop.log_reloads7���7�?�?�8�,�,���V�E�h�E�E�E�F�F�F�F�Fr")NNr)rrq�rN)�__name__�
__module__�__qualname__rrV�Optional�IterablerX�Union�int�floatrwr{r�r�ryr�r�r�rRr"r rqrq�s:������
�D�48�8<�()�	!�!��Z��
�3��0�!��*�Q�Z��_�5�!��'�#�u�*�%�	!�

�!�!�!�!�����
�
�
�&�&�&�&�
�
�
�
�!�s�!�!�!�!��s��t�����G�3�G�4�G�G�G�G�G�Gr"rqc�0��eZdZdZdef�fd�Zdd�Z�xZS)�StatReloaderLoop�statrc�R��i|_t�����Sr&)�mtimes�superr{�rv�	__class__s �r r{zStatReloaderLoop.__enter__s ���*,����w�w� � �"�"�"r"Nc��t|j|j��D]o}	tj|��j}n#t$rY�)wxYw|j�|��}|�||j|<�T||kr|�	|���pdSr&)
r>r,r$rr��st_mtime�OSErrorr��getr�)rvr�mtime�old_times    r ryzStatReloaderLoop.run_steps���$�T�%5�t�7L�M�M�
	*�
	*�D�
����
�
�.�����
�
�
���
�����{���t�,�,�H���$)���D�!���x����#�#�D�)�)�)��
	*�
	*s�8�
A�Ar�)r�r�r�rrqr{ry�
__classcell__�r�s@r r�r�s]��������D�#�<�#�#�#�#�#�#�*�*�*�*�*�*�*�*r"r�c�v��eZdZdejdejddf�fd�Zdeddfd�Zdef�fd�Z	d	�Z
dd
�Zdd�Z�xZ
S)
�WatchdogReloaderLooprm�kwargsrNc����ddlm}ddlm}t	��j|i|��|j�G�fd�d|��}|j���}|�	d��r
|dd�}d|�d	�|_
|��|_d
�|jD��}|ddd
g|�gd�tD���|j����|_d|_dS)Nr)�Observer)�PatternMatchingEventHandlerc���eZdZ�fd�ZdS)�3WatchdogReloaderLoop.__init__.<locals>.EventHandlerc�(���|j��dSr&)�src_path)rv�eventr�s  �r �on_any_eventz@WatchdogReloaderLoop.__init__.<locals>.EventHandler.on_any_event9s�����u�~�.�.�.�.�.r"N)r�r�r�r�)r�s�r �EventHandlerr�8s.�������
/�
/�
/�
/�
/�
/�
/r"r��observeri����z
watchdog (�)c�P�g|]#}tj�|���!|��$SrR)rr�isdir)rF�ps  r �
<listcomp>z1WatchdogReloaderLoop.__init__.<locals>.<listcomp>Hs+��N�N�N��R�W�]�]�1�=M�=M�N�!�N�N�Nr"z*.pyz*.pycz*.zipc��g|]}d|�d���	S)z*/z/*rR)rF�ds  r r�z1WatchdogReloaderLoop.__init__.<locals>.<listcomp>Ls ��:�:�:��*�q�*�*�*�:�:�:r")�patterns�ignore_patternsF)�watchdog.observersr��watchdog.eventsr�r�rwr�r��lowerr6rr�r,r4r$�
event_handler�
should_reload)
rvrmr�r�r�r��
reloader_name�extra_patternsr�r�s
        @�r rwzWatchdogReloaderLoop.__init__1sR����/�/�/�/�/�/�?�?�?�?�?�?������$�)�&�)�)�)��,��	/�	/�	/�	/�	/�	/�	/�6�	/�	/�	/�!�)�/�/�1�1�
��!�!�*�-�-�	/�)�#�2�#�.�M�1��1�1�1��	� ��
�
��
�O�N�T�%5�N�N�N��)�\��g�w�@��@��:�:�&9�:�:�:���&��
�
�
���#����r"r�c�>�d|_|�|��dS)NT)r�r�r�s  r r�z#WatchdogReloaderLoop.trigger_reloadRs$��"�������!�!�!�!�!r"c���i|_|j���t�����Sr&)�watchesr��startr�r{r�s �r r{zWatchdogReloaderLoop.__enter__Ys4���+-����
�������w�w� � �"�"�"r"c�j�|j���|j���dSr&)r��stopr7r}s    r r�zWatchdogReloaderLoop.__exit__^s0���
�������
�������r"c��|js4|���tj|j��|j�4tjd��dSr�)r�ryr�r�rrrr�rzs r r�zWatchdogReloaderLoop.runbsL���$�	&��M�M�O�O�O��J�t�}�%�%�%��$�	&�	�������r"c��t|j��}t|j|j��D]f}||jvrF	|j�|j|d���|j|<n#t$r
d|j|<YnwxYw|�	|���g|D]9}|j�
|d��}|�|j�|���:dS)NT)�	recursive)r.r�rAr,r$r��scheduler�r��discardrg�
unschedule)rv�	to_deleter�watchs    r ryzWatchdogReloaderLoop.run_stepis
�����%�%�	�(��)9�4�;P�Q�Q�	$�	$�D��4�<�'�'�.�)-��)?�)?��*�D�D�*@�*�*�D�L��&�&���.�.�.�*.�D�L��&�&�&�	.����
���d�#�#�#�#��	0�	0�D��L�$�$�T�4�0�0�E�� ��
�(�(��/�/�/��		0�	0s�*A&�&A=�<A=r�)r�r�r�rV�AnyrwrXr�rqr{r�r�ryr�r�s@r r�r�0s��������#�a�e�#�q�u�#��#�#�#�#�#�#�B"�s�"�t�"�"�"�"�#�<�#�#�#�#�#�#�
�������0�0�0�0�0�0�0�0r"r�)r��watchdog�reloader_loopszwatchdog.observersr��autor�c�d�tj�tj���sdS	ddl}n#t$rYdSwxYw|�tj��}|d|jzs=|dxx|jzcc<|�tj|j|��dSdS)zuEnsure that echo mode is enabled. Some tools such as PDB disable
    it which causes usability issues after a reload.Nrr�)	r�stdin�isatty�termios�ImportError�	tcgetattr�ECHO�	tcsetattr�TCSANOW)r��
attributess  r �ensure_echo_onr��s����y���	� 0� 0� 2� 2�����������������������"�"�3�9�-�-�J��a�=�7�<�'�B��1�
�
�
���%�
�
�
����#�)�W�_�j�A�A�A�A�A�B�Bs�3�
A�A�	main_funcrr�
reloader_typec��ddl}|�|jd���t||||���}	tj�d��dkrkt
��tj|d���}d	|_	|5|j
��|���ddd��dS#1swxYwYdStj
|�����dS#t$rYdSwxYw)
z<Run the given function in an independent Python interpreter.rNc�*�tjd��S)Nr)rr�)rms r �<lambda>z#run_with_reloader.<locals>.<lambda>�s�������r")r,r$rrr�r�rR)�targetrmT)�signal�SIGTERMr�rr�r�r��	threading�Thread�daemonr�r�rr�r��KeyboardInterrupt)r�r,r$rrr�r��reloaderrVs        r �run_with_reloaderr��s[���M�M�M�
�M�M�&�.�";�";�<�<�<��m�,��2B�X����H�
�
�:�>�>�-�.�.�&�8�8������ �	��;�;�;�A��A�H��
�
����	�	�	�������
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�
�
�H�X�3�3�5�5�6�6�6�6�6���
�
�
����
���s<�AC0�
$B;�.C0�;B?�?C0�B?�C0�&C0�0
C>�=C>r�)NNrr�)4r(rr�rr�r��typingrV�	itertoolsr�pathlibr�	_internalr�tuple�base_prefix�base_exec_prefixrrN�exec_prefix�hasattrr0rr2r4�IteratorrXr!�Setr+r�r>rAr@�Listrorqr�r�r��Dict�Type�__annotations__�
__import__r�r��Callabler�r�r�r�r�rRr"r �<module>rs�������	�	�	�	�����
�
�
�
������������������������������������)=�>�?�?��	7�>�	7�3�:�	7�s��	7��
�7�3�
��� �
�J�J�s������E�&�M�M��
������A�J�s�O�����(@�a�e�C�j�@�A�E�#�J�@�4�@�@�@�@�
3���s��3�/0�u�S�z�3��Z��_�3�3�3�3�l$���s��$�/0�u�S�z�$��Z��_�$�$�$�$�0�a�j��o��!�*�S�/�����03�����3�3�3�3�l:G�:G�:G�:G�:G�:G�:G�:G�z*�*�*�*�*�|�*�*�*�0N0�N0�N0�N0�N0�<�N0�N0�N0�d
�$�5�5����s�A�F�<�0�0�1����
8��J�#�$�$�$�,�J�7�N�6�����4�4�4�+�F�3�N�6����4����B�B�B�B�*04�48�$%��
�
��z�"�d�(�#�
���A�J�s�O�,�
��j���C��1�
��g�c�5�j�!�	
�
�
�
�

�
�
�
�
�
s�F(�(F;�:F;

Youez - 2016 - github.com/yon3zu
LinuXploit