[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.145.152.168: ~ $
�

3�DgG�
���ddlmZddlmZmZddlmZmZddlm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZmZmZGd�d��ZGd�d	e��ZGd
�de��ZGd�d
e��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��Z dee!dee!de"fd�Z#ed���	d%d e!d!e$d"e"de$fd#���Z%d$S)&�)�	lru_cache)�List�Optional�)�COMMON_SAFE_ASCII_CHARACTERS�UNICODE_SECONDARY_RANGE_KEYWORD)�is_accentuated�is_ascii�is_case_variable�is_cjk�is_emoticon�	is_hangul�is_hiragana�is_katakana�is_latin�is_punctuation�is_separator�	is_symbol�is_thai�
remove_accent�
unicode_rangec�V�eZdZdZdedefd�Zdeddfd�Zd	d�Ze	de
fd���ZdS)
�MessDetectorPluginzy
    Base abstract class used for mess detection plugins.
    All detectors MUST extend and implement given methods.
    �	character�returnc��t�)z@
        Determine if given character should be fed in.
        ��NotImplementedError��selfrs  �u/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/charset_normalizer/md.py�eligiblezMessDetectorPlugin.eligible�
��"�!�Nc��t�)z�
        The main routine to be executed upon character.
        Insert the logic in witch the text would be considered chaotic.
        rrs  r!�feedzMessDetectorPlugin.feed$s
��
"�!r$c��t�)zB
        Permit to reset the plugin to the initial state.
        r�r s r!�resetzMessDetectorPlugin.reset+r#r$c��t�)z�
        Compute the chaos ratio based on what your feed() has seen.
        Must NOT be lower than 0.; No restriction gt 0.
        rr(s r!�ratiozMessDetectorPlugin.ratio1s
��"�!r$�rN)�__name__�
__module__�__qualname__�__doc__�str�boolr"r&r)�property�floatr+�r$r!rrs���������
"�#�"�$�"�"�"�"�"�c�"�d�"�"�"�"�"�"�"�"��"�u�"�"�"��X�"�"�"r$rc�Z�eZdZd	d�Zdedefd�Zdeddfd�Zd	d�Ze	de
fd���ZdS)
� TooManySymbolOrPunctuationPluginrNc�L�d|_d|_d|_d|_d|_dS)NrF)�_punctuation_count�
_symbol_count�_character_count�_last_printable_char�_frenzy_symbol_in_wordr(s r!�__init__z)TooManySymbolOrPunctuationPlugin.__init__;s0��"#������ !���$(��!�&+��#�#�#r$rc�*�|���S�N��isprintablers  r!r"z)TooManySymbolOrPunctuationPlugin.eligibleC����$�$�&�&�&r$c�(�|xjdz
c_||jkro|tvrft|��r|xjdz
c_nF|���dur0t
|��r!t|��dur|xjdz
c_||_dS)NrF�)	r;r<rrr9�isdigitrr
r:rs  r!r&z%TooManySymbolOrPunctuationPlugin.feedFs�������"���
��2�2�2��!=�=�=��i�(�(�
(��'�'�1�,�'�'�'��!�!�#�#�u�,�,��i�(�(�-��	�*�*�e�3�3��"�"�a�'�"�"�$-��!�!�!r$c�0�d|_d|_d|_dS�Nr)r9r;r:r(s r!r)z&TooManySymbolOrPunctuationPlugin.resetXs ��"#��� !�������r$c�^�|jdkrdS|j|jz|jz}|dkr|ndS)Nr�g333333�?)r;r9r:)r �ratio_of_punctuations  r!r+z&TooManySymbolOrPunctuationPlugin.ratio]sK��� �A�%�%��3�
�#�d�&8�8��!� "��(<�s�'B�'B�#�#��Kr$r,�r-r.r/r>r1r2r"r&r)r3r4r+r5r$r!r7r7:s�������,�,�,�,�'�#�'�$�'�'�'�'�.�c�.�d�.�.�.�.�$����
�L�u�L�L�L��X�L�L�Lr$r7c�Z�eZdZd	d�Zdedefd�Zdeddfd�Zd	d�Ze	de
fd���ZdS)
�TooManyAccentuatedPluginrNc�"�d|_d|_dSrH�r;�_accentuated_countr(s r!r>z!TooManyAccentuatedPlugin.__init__j��� !���"#����r$rc�*�|���Sr@)�isalphars  r!r"z!TooManyAccentuatedPlugin.eligiblens��� � �"�"�"r$c�h�|xjdz
c_t|��r|xjdz
c_dSdS�Nr)r;r	rQrs  r!r&zTooManyAccentuatedPlugin.feedqsJ������"����)�$�$�	)��#�#�q�(�#�#�#�#�	)�	)r$c�"�d|_d|_dSrHrPr(s r!r)zTooManyAccentuatedPlugin.resetwrRr$c�N�|jdkrdS|j|jz}|dkr|ndS)NrrJgffffff�?rP)r �ratio_of_accentuations  r!r+zTooManyAccentuatedPlugin.ratio{s@��� �A�%�%��3��#�d�&;�;�	�)>��(E�(E�$�$�3�Nr$r,rLr5r$r!rNrNis�������$�$�$�$�#�#�#�$�#�#�#�#�)�c�)�d�)�)�)�)�$�$�$�$��O�u�O�O�O��X�O�O�Or$rNc�Z�eZdZd	d�Zdedefd�Zdeddfd�Zd	d�Ze	de
fd���ZdS)
�UnprintablePluginrNc�"�d|_d|_dSrH)�_unprintable_countr;r(s r!r>zUnprintablePlugin.__init__�s��"#��� !����r$rc��dS�NTr5rs  r!r"zUnprintablePlugin.eligible�����tr$c��|���dur,|���dur|dkr|xjdz
c_|xjdz
c_dS)NF�r)�isspacerBr]r;rs  r!r&zUnprintablePlugin.feed�si�������5�(�(��%�%�'�'�5�0�0��V�#�#��#�#�q�(�#�#�����"����r$c��d|_dSrH)r]r(s r!r)zUnprintablePlugin.reset�s��"#����r$c�@�|jdkrdS|jdz|jzS)NrrJ�)r;r]r(s r!r+zUnprintablePlugin.ratio�s+��� �A�%�%��3��'�!�+�t�/D�D�Dr$r,rLr5r$r!r[r[�s�������"�"�"�"��#��$�����#�c�#�d�#�#�#�#�$�$�$�$��E�u�E�E�E��X�E�E�Er$r[c�Z�eZdZd	d�Zdedefd�Zdeddfd�Zd	d�Ze	de
fd���ZdS)
�SuspiciousDuplicateAccentPluginrNc�0�d|_d|_d|_dSrH��_successive_countr;�_last_latin_characterr(s r!r>z(SuspiciousDuplicateAccentPlugin.__init__�s ��!"��� !���%)��"�"�"r$rc�H�|���ot|��Sr@)rTrrs  r!r"z(SuspiciousDuplicateAccentPlugin.eligible�s!��� � �"�"�:�x�	�':�':�:r$c�l�|xjdz
c_|j��t|��r�t|j��rr|���r)|j���r|xjdz
c_t|��t|j��kr|xjdz
c_||_dSrV)r;rlr	�isupperrkrrs  r!r&z$SuspiciousDuplicateAccentPlugin.feed�s�������"����&�2��y�)�)�
3��t�9�:�:�
3�� � �"�"�
,�t�'A�'I�'I�'K�'K�
,��&�&�!�+�&�&��Y�'�'�=��9S�+T�+T�T�T��&�&�!�+�&�&�%.��"�"�"r$c�0�d|_d|_d|_dSrHrjr(s r!r)z%SuspiciousDuplicateAccentPlugin.reset�s ��!"��� !���%)��"�"�"r$c�@�|jdkrdS|jdz|jzS)NrrJrE)r;rkr(s r!r+z%SuspiciousDuplicateAccentPlugin.ratio�s+��� �A�%�%��3��&��*�d�.C�C�Cr$r,rLr5r$r!rhrh�s�������*�*�*�*�;�#�;�$�;�;�;�;�/�c�/�d�/�/�/�/�*�*�*�*�
�D�u�D�D�D��X�D�D�Dr$rhc�Z�eZdZd	d�Zdedefd�Zdeddfd�Zd	d�Ze	de
fd���ZdS)
�SuspiciousRangerNc�0�d|_d|_d|_dSrH)�"_suspicious_successive_range_countr;�_last_printable_seenr(s r!r>zSuspiciousRange.__init__�s ��23��/� !���$(��!�!�!r$rc�*�|���Sr@rArs  r!r"zSuspiciousRange.eligible�rCr$c�D�|xjdz
c_|���st|��s	|tvr	d|_dS|j�	||_dSt|j��}t|��}t
||��r|xjdz
c_||_dSrV)r;rcrrrvr� is_suspiciously_successive_rangeru)r r�unicode_range_a�unicode_range_bs    r!r&zSuspiciousRange.feed�s�������"���
�����	��i�(�(�	��8�8�8�(,�D�%��F��$�,�(1�D�%��F�'��%�
�
��(�	�2�2��+�O�_�M�M�	9��3�3�q�8�3�3�$-��!�!�!r$c�0�d|_d|_d|_dSrH)r;rurvr(s r!r)zSuspiciousRange.reset�s �� !���23��/�$(��!�!�!r$c�T�|jdkrdS|jdz|jz}|dkrdS|S)NrrJrEg�������?)r;ru)r �ratio_of_suspicious_range_usages  r!r+zSuspiciousRange.ratio�sH��� �A�%�%��3�
�3�a�7��!�+"�'�+�S�0�0��3�.�.r$r,rLr5r$r!rsrs�s�������)�)�)�)�
'�#�'�$�'�'�'�'�.�c�.�d�.�.�.�.�2)�)�)�)�
�/�u�/�/�/��X�/�/�/r$rsc�Z�eZdZd	d�Zdedefd�Zdeddfd�Zd	d�Ze	de
fd���ZdS)
�SuperWeirdWordPluginrNc��d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)NrF�)	�_word_count�_bad_word_count�_foreign_long_count�_is_current_word_bad�_foreign_long_watchr;�_bad_character_count�_buffer�_buffer_accent_countr(s r!r>zSuperWeirdWordPlugin.__init__�sO����� ���#$�� �$)��!�#(�� � !���$%��!����$%��!�!�!r$rc��dSr_r5rs  r!r"zSuperWeirdWordPlugin.eligibler`r$c��|���r�d�|j|g��|_t|��r|xjdz
c_|jdur|t
|��dust|��r\t|��durKt|��dur:t|��dur)t|��durt|��durd|_dS|jsdS|���st|��st|���r"|j�r|xjdz
c_t!|j��}|xj|z
c_|dkre|j|zdkrd|_t|jd��r6|jd���r|xjdz
c_d|_|dkr|jr|xjdz
c_d|_|jr9|xjdz
c_|xjt!|j��z
c_d|_d|_d|_d	|_dS|d
vr>|���dur*t1|��rd|_|xj|z
c_dSdSdSdS)Nr�rFT�g�(\���?����r>�_�-�<�=�>�|�~)rT�joinr�r	r�r�rrrrrrrcrrr��lenr;r�ror�r�r�rFr)r r�
buffer_lengths   r!r&zSuperWeirdWordPlugin.feeds��������	��7�7�D�L�)�#<�=�=�D�L��i�(�(�
/��)�)�Q�.�)�)��(�E�1�1��i�(�(�E�1�1�^�I�5N�5N�1��9�%�%��.�.��i�(�(�E�1�1��	�*�*�e�3�3��	�*�*�e�3�3��I�&�&�%�/�/�+/��(��F��|�	��F������"	&�#1�)�#<�#<�"	&�@L�Y�@W�@W�"	&��l�"	&�
����!������-�-�M��!�!�]�2�!�!���!�!��,�}�<�t�C�C�04�D�-�"�$�,�r�"2�3�3�5���R�8H�8P�8P�8R�8R�5��,�,��1�,�,�04�D�-���"�"�t�'?�"��(�(�A�-�(�(�,0��)��(�
2��$�$��)�$�$��)�)�S���->�->�>�)�)�,1��)�',�D�$��D�L�()�D�%�%�%��@�@�@��!�!�#�#�u�,�,��)�$�$�-�)-�D�%��L�L�I�%�L�L�L�L�
A�@�,�,�,�,r$c�v�d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr�Fr)r�r�r�r�r�r;r�r�r(s r!r)zSuperWeirdWordPlugin.resetDsG�����$)��!�#(�� � ������ !���$%��!�#$�� � � r$c�P�|jdkr
|jdkrdS|j|jzS)N�
rrJ)r�r�r�r;r(s r!r+zSuperWeirdWordPlugin.ratioNs3����r�!�!�d�&>�!�&C�&C��3��(�4�+@�@�@r$r,rLr5r$r!r�r��s�������&�&�&�&��#��$�����4&�c�4&�d�4&�4&�4&�4&�l%�%�%�%��A�u�A�A�A��X�A�A�Ar$r�c�^�eZdZdZd
d�Zdedefd�Zdeddfd�Zd
d�Z	e
defd	���ZdS)�CjkInvalidStopPluginu�
    GB(Chinese) based encoding often render the stop incorrectly when the content does not fit and
    can be easily detected. Searching for the overuse of '丅' and '丄'.
    rNc�"�d|_d|_dSrH��_wrong_stop_count�_cjk_character_countr(s r!r>zCjkInvalidStopPlugin.__init__\���!"���$%��!�!�!r$rc��dSr_r5rs  r!r"zCjkInvalidStopPlugin.eligible`r`r$c�t�|dvr|xjdz
c_dSt|��r|xjdz
c_dSdS)N>�丄�丅r)r�rr�rs  r!r&zCjkInvalidStopPlugin.feedcsZ����&�&��"�"�a�'�"�"��F��)���	+��%�%��*�%�%�%�%�	+�	+r$c�"�d|_d|_dSrHr�r(s r!r)zCjkInvalidStopPlugin.resetjr�r$c�:�|jdkrdS|j|jzS)N�rJ)r�r�r(s r!r+zCjkInvalidStopPlugin.rations&���$�r�)�)��3��%��(A�A�Ar$r,)
r-r.r/r0r>r1r2r"r&r)r3r4r+r5r$r!r�r�Vs���������
&�&�&�&��#��$�����+�c�+�d�+�+�+�+�&�&�&�&��B�u�B�B�B��X�B�B�Br$r�c�Z�eZdZd	d�Zdedefd�Zdeddfd�Zd	d�Ze	de
fd���ZdS)
�ArchaicUpperLowerPluginrNc�h�d|_d|_d|_d|_d|_d|_d|_dS)NFrT)�_buf�_character_count_since_last_sep�_successive_upper_lower_count�#_successive_upper_lower_count_finalr;�_last_alpha_seen�_current_ascii_onlyr(s r!r>z ArchaicUpperLowerPlugin.__init__vs?����	�/0��,�-.��*�34��0� !��� $���#'�� � � r$rc��dSr_r5rs  r!r"z ArchaicUpperLowerPlugin.eligible�r`r$c��|���ot|��}|du}|r|jdkrt|jdkr4|���dur|jdur|xj|jz
c_d|_d|_d|_d|_|xj	dz
c_	d|_dS|jdurt|��durd|_|j��|���r|j���s-|���rB|j���r)|jdur|xjdz
c_d|_nd|_nd|_|xj	dz
c_	|xjdz
c_||_dS)NFr�@rTrE)
rTrr�rFr�r�r�r�r�r;r
ro�islower)r r�is_concerned�	chunk_seps    r!r&zArchaicUpperLowerPlugin.feed�s��� �(�(�*�*�J�/?�	�/J�/J�� �E�)�	��	��=��A�A��4��:�:��%�%�'�'�5�0�0��,��5�5��8�8��6��8�8�23�D�.�34�D�0�$(�D�!��D�I��!�!�Q�&�!�!�'+�D�$��F��#�t�+�+���0C�0C�u�0L�0L�',�D�$�� �,��!�!�#�#�	
"��(=�(E�(E�(G�(G�	
"��!�!�#�#�	
"�(,�(=�(E�(E�(G�(G�	
"��9��$�$��6�6�!�;�6�6� %�D�I�I� $�D�I�I�!��	�����"����,�,��1�,�,� )����r$c�h�d|_d|_d|_d|_d|_d|_d|_dS)NrFT)r;r�r�r�r�r�r�r(s r!r)zArchaicUpperLowerPlugin.reset�s?�� !���/0��,�-.��*�34��0� $�����	�#'�� � � r$c�:�|jdkrdS|j|jzS)NrrJ)r;r�r(s r!r+zArchaicUpperLowerPlugin.ratio�s&��� �A�%�%��3��7�$�:O�O�Or$r,rLr5r$r!r�r�us�������(�(�(�(��#��$�����(*�c�(*�d�(*�(*�(*�(*�T(�(�(�(��P�u�P�P�P��X�P�P�Pr$r�rzr{rc��|�|�dS||krdSd|vrd|vrdSd|vsd|vrdSd|vsd|vr
d|vsd|vrdS|�d��|�d��}}|D]}|tvr�||vrdS�|dv|dv}}|s|r
d	|vsd	|vrdS|r|rdSd
|vsd
|vrd	|vsd	|vrdS|dks|dkrdSd	|vsd	|vs|dvr|dvrd
|vsd
|vrdSd|vsd|vrdSdS)za
    Determine if two Unicode range seen next to each other can be considered as suspicious.
    NTF�Latin�	Emoticons�	Combining� )�Hiragana�Katakana�CJK�HangulzBasic Latin)r�r��Punctuation�Forms)�splitr)rzr{�keywords_range_a�keywords_range_b�el�range_a_jp_chars�range_b_jp_charss       r!ryry�s����/�"9��t��/�)�)��u��/�!�!�g��&@�&@��u��o�%�%���)G�)G��u�	�?�"�"�g��&@�&@���&�&�+��*H�*H��u�)8�)>�)>��*�*����S�!�!�'������
�0�0�0��
�!�!�!��5�5�"�
	�
�	
�
	�3�3�
'��	��,��
�� � �E�_�$<�$<��u���,���u��?�"�"�h�/�&A�&A��O�#�#�u��'?�'?��5��m�+�+��-�/O�/O��5�	�� � �E�_�$<�$<��3�3�3��7�7�7��O�+�+�}��/O�/O��5��o�%�%��O�)C�)C��5��4r$i)�maxsize皙�����?F�decoded_sequence�maximum_threshold�debugc��d�t���D��}t|��dz}d}|dkrd}n|dkrd}nd}t|d	zt	|����D]m\}}|D],}	|	�|��r|	�|���-|d
kr	||zd
ks	||dz
kr!td�|D����}||krn�n|r|D]}
t|
j	|
j
���t|d��S)
zw
    Compute a mess ratio given a decoded bytes sequence. The maximum threshold does stop the computation earlier.
    c�"�g|]}|����
Sr5r5)�.0�md_classs  r!�
<listcomp>zmess_ratio.<locals>.<listcomp>s+��������
�
���r$rrJi� ir���
rc3�$K�|]}|jV��dSr@)r+)r��dts  r!�	<genexpr>zmess_ratio.<locals>.<genexpr>&s$����!?�!?�r�"�(�!?�!?�!?�!?�!?�!?r$�)r�__subclasses__r��zip�ranger"r&�sum�print�	__class__r+�round)r�r�r��	detectors�length�mean_mess_ratio�!intermediary_mean_mess_ratio_calcr�index�detectorr�s           r!�
mess_ratior�sh����#5�#D�#D�#F�#F����I��!�
"�
"�Q�
&�F��O�
��|�|�,.�)�)�	�4���,.�)�)�,/�)�� 0�4� 7��v���G�G����	�5�!�	)�	)�H�� � ��+�+�
)��
�
�i�(�(�(��
�A�I�I�%�"C�C�q�H�H�
�f�q�j�
 �
 �!�!?�!?�Y�!?�!?�!?�?�?�O��"3�3�3�����*��	*�	*�B��"�,���)�)�)�)���!�$�$�$r$N)r�F)&�	functoolsr�typingrr�constantrr�utilsr	r
rrr
rrrrrrrrrrrr7rNr[rhrsr�r�r�r1r2ryr4r�r5r$r!�<module>r�s[��������!�!�!�!�!�!�!�!�S�S�S�S�S�S�S�S�����������������������������������&"�"�"�"�"�"�"�"�D,L�,L�,L�,L�,L�'9�,L�,L�,L�^O�O�O�O�O�1�O�O�O�8E�E�E�E�E�*�E�E�E�8"D�"D�"D�"D�"D�&8�"D�"D�"D�J3/�3/�3/�3/�3/�(�3/�3/�3/�lWA�WA�WA�WA�WA�-�WA�WA�WA�tB�B�B�B�B�-�B�B�B�>IP�IP�IP�IP�IP�0�IP�IP�IP�XC��c�]�C�5=�c�]�C�	�C�C�C�C�L��4����IN�'%�'%��'%�.3�'%�BF�'%�
�'%�'%�'%���'%�'%�'%r$

Filemanager

Name Type Size Permission Actions
__init__.cpython-311.pyc File 2.03 KB 0644
api.cpython-311.pyc File 20.31 KB 0644
cd.cpython-311.pyc File 14.41 KB 0644
constant.cpython-311.pyc File 27.72 KB 0644
legacy.cpython-311.pyc File 4.38 KB 0644
md.cpython-311.pyc File 23.54 KB 0644
models.cpython-311.pyc File 19.87 KB 0644
utils.cpython-311.pyc File 13.84 KB 0644
version.cpython-311.pyc File 375 B 0644