Uname:Linux developmentwebsite.ca 4.18.0-553.168.1.el8_10.x86_64 #1 SMP Thu Sep 24 18:05:46 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 173.249.148.11  /  Your IP : 216.73.216.179
Web Server : Apache/2.4.68 (AlmaLinux)
System : Linux developmentwebsite.ca 4.18.0-553.168.1.el8_10.x86_64 #1 SMP Thu Sep 24 18:05:46 UTC 2026 x86_64
User : devinter ( 1006)
PHP Version : 8.3.35
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /snap/certbot/5893/lib64/python3.12/site-packages/charset_normalizer/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /snap/certbot/5893/lib64/python3.12/site-packages/charset_normalizer/__pycache__/cd.cpython-312.pyc
�

��jl>��H�ddlmZddlZddlmZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZddlmZmZmZddlmZdd	lmZmZdd
�Zdd�Ze�dd��Ze�dd
��Zee
��dd��Z	d					dd�Z						dd�Zdd�Zdd�Z dd�Z!	d							d d�Z"y)!�)�annotationsN)�IncrementalDecoder)�	lru_cache�)�FREQUENCIES�KO_NAMES�LANGUAGE_SUPPORTED_COUNT�TOO_SMALL_SEQUENCE�ZH_NAMES�_FREQUENCIES_SET�_FREQUENCIES_RANK)�_ASCII_CHAR_INFO�
_char_info� is_suspiciously_successive_range)�CoherenceMatches)�is_multi_byte_encoding�is_unicode_range_secondaryc��t|�rtd��tjd|���j}|d��}i}d}tdd�D]�}|j
t|g��}|s�!t|�}|dkrt|j
nt|�j
}|��\t|�r�h||vrd||<||xxd	z
cc<|d	z
}��t|D�cgc]}|||zd
k\r|��c}�Scc}w)zF
    Return associated unicode ranges in a single byte code page.
    z.Function not supported on multi-byte code pagez
encodings.�ignore)�errorsr�@��rg333333�?)
r�OSError�	importlib�
import_moduler�range�decode�bytes�ordrrr�sorted)	�	iana_name�decoder�p�seen_ranges�character_count�i�chunk�chunk_codepoint�character_ranges	         �Q/root/parts/certbot/install/lib/python3.12/site-packages/charset_normalizer/cd.py�encoding_unicode_ranger,s/���i�(��<�
�	
��%�%�
�9�+�&>�?�R�R�G�#�8�4�A�"$�K��O�
�4��
�%���X�X�e�Q�C�j�)���!�%�j�O�#�S�(�!��1�7�7���&�,�,�
��&��-�o�>�"�+�5�34�K��0��O�,��1�,��1�$��%%�(�$/�	
���?�+�o�=��E�
�	
����	
s� C;c���g}tj�D]R\}}|D]H}t|�}|dkr	t|n
t	|�}|j
|k(s�7|j
|��R�T|S)z>
    Return inferred languages used with a unicode range.
    r)r�itemsr rrr�append)�
primary_range�	languages�language�
characters�	character�	codepoint�infos       r+�unicode_range_languagesr7Ds����I� +� 1� 1� 3�
���*�#�		�I��I��I��s�?�!��+��	�*�
�
�z�z�]�*�� � ��*��		�
���c�~�	t|�}d}|D]
}d|vs�|}n|�dgSt|�S#t$rgcYSwxYw)z�
    Single-byte encoding language association. Some code page are heavily linked to particular language(s).
    This function does the correspondence.
    N�Latin�Latin Based)r,�ImportErrorr7)r"�unicode_rangesr0�specified_ranges    r+�encoding_languagesr?Ysh���$:�9�$E��!%�M�)����/�)�+�M���
�����"�=�1�1�����	��s�.�<�<c���|jd�s'|jd�s|jd�s|dk(rdgS|jd�s|tvrdgS|jd�s|tvrd	gSgS)
z�
    Multi-byte encoding language association. Some code page are heavily linked to particular language(s).
    This function does the correspondence.
    �shift_�
iso2022_jp�euc_j�cp932�Japanese�gb�Chinese�
iso2022_kr�Korean)�
startswithrr)r"s r+�mb_encoding_languagesrKqs}��	���X�&�����-�����(�����|�����D�!�Y�(�%:��{�����L�)�Y�(�-B��z��
�Ir8)�maxsizec��d}d}t|D]H}t|�}|dkr	t|n
t|�}|s|jrd}|s�:|j
r�Gd}�J||fS)zg
    Determine main aspects from a supported language if it contains accents and if is pure Latin.
    FTr)rr rr�accentuated�latin)r2�target_have_accents�target_pure_latinr4r5r6s      r+�get_target_featuresrR�ss��
!&��"�� ��*�&�	��	�N�	�.7�#�o��	�*�:�i�CX��"�t�'7�'7�"&���T�Z�Z� %��
&�� 1�1�1r8c���g}t|�}d}|D]6}t|�}|dkr	t|n
t|�}|js�4d}ntj�D][\}}	t|�\}
}|r|s�|
s|r�t|	�}tt||z�}
|
|z}|dk\s�I|j||f��]t|d�d��}|D�cgc]}|d��	c}Scc}w)zE
    Return associated languages associated to given characters.
    FrTg�������?c��|dS�Nr���xs r+�<lambda>z$alphabet_languages.<locals>.<lambda>�s
���!��r8��key�reverser)�	frozensetr rrrNrr.rR�lenrr/r!)r3�ignore_non_latinr1�characters_set�source_have_accentsr4r5r6r2�language_charactersrPrQr&�character_match_count�ratio�compatible_languages                r+�alphabet_languagesrf�s��*,�I�%.�z�%:�N�����	��	�N�	�.7�#�o��	�*�:�i�CX�����"&����*5�):�):�)<�0�%��%�1D�X�1N�.��.��$5��"�':��"�#6�7��%(�)9�(�)C�n�)T�%U��,��>���C�<����h��.�/�!0�$�y�n�d�C�I�>G�H�':���"�H�H��Hs�Cc��|tvrt|�d���d}t|}t|�}tt|�}|dkD}|dz}||z}g}	g}
t	|�D];\}}|j|�}
|
��|	j
|
�|
j
|��=t|	|
�D]�\}}t||z�}|st||z
�dkDr�(|rt||z
�|kr|dz
}�A|dk(r|dz
}�L||z
}d}d}t|	|
�D]E\}}||kr||ks�|dz
}d|zd|zk\s�"|dz
}��||k\s�/|dz
}d|zd|zk\s�@|dz
}����|t|�zS)	aN
    Determine if a ordered characters list (by occurrence from most appearance to rarest) match a particular language.
    The result is a ratio between 0. (absolutely no correspondence) and 1. (near perfect fit).
    Beware that is function is not strict on the match in order to ease the detection. (Meaning close match is 1.)
    z not availabler���r��)
r�
ValueErrorr
r^�	enumerate�getr/�zip�int�abs)r2�ordered_characters�character_approved_count�	lang_rank�ordered_characters_count� target_language_characters_count�large_alphabet�large_alphabet_threshold�expected_projection_ratio�	common_lr�
common_orr�popularity_rankr4�
language_rank�character_rank_in_language�character_rank�character_rank_projection�	after_len�before_match_count�after_match_count�lr_i�orr_is                      r+�characters_popularity_comparer��s
���{�"��H�:�^�4�5�5�$%�� 1�(� ;�I�$'�(:�$;��,/��H�0E�,F�$�;�b�@�N�&F��&J��	)�+C�C���I��J�&/�0B�&C�/�"���!�
�
�i�0�
��$����]�+����o�.�	/�7:�)�Z�6P�1�2�"�N�),�^�>W�-W�)X�!���-�0J�J�K�a�O��
��-�0J�J�K�&�'�
%��)�$��%��*�
%��)�$��9�<V�V�	�#$��!"���y�*�5�	�K�D�%��0�0��>�)�&�!�+�&��-�-��5O�1O�O�0�A�5�0���N�*�%��*�%��,�,��I�
�=�0�A�5�0��	�K1�f$�c�*<�&=�=�=r8c��i}d}d}d}d}|D]�}t|�}|dkr
t|}nt|�}|js�5|j}	|	��D|	|k(r|�||j|��`d}
|r|D]}t
||	�r�|}
nn|�t
||	�s|}
|
�|	}
|
|vrg||
<|�|
}nd}||
j|�|	}|
}��|j�D�cgc]!}dj|�j���#c}Scc}w)a
    Given a decoded text sequence, return a list of str. Unicode range / alphabet separation.
    Ex. a text containing English/Latin with a bit a Hebrew will return two items in the resulting list;
    One containing the latin letters and the other hebrew.
    NFrT�)
r rr�alpharr/r�values�join�lower)
�decoded_sequence�layers�single_layer_key�multi_layer�prev_character_range�prev_layer_targetr4r5r6r*�layer_target_range�discovered_range�charss
             r+�alpha_unicode_splitr�sh��$&�F�$(���K�(,��$(��%�3/�	��Y��	��s�?�#�I�.�D��i�(�D��z�z��&*�j�j���"���2�2� �,��(�)�0�0��;��)-���$*�
� �7�$�o��*:�&��
��
)�3�4D�o�V�%5�"��%�!0���V�+�)+�F�%�&��'�#5� �"���!�"�)�)�)�4� /��.��g3/�j17�
�
��@�u�B�G�G�E�N� � �"�@�@��@s�&Dc��i}|D]-}|D]&}|\}}||vr|g||<�||j|��(�/|D�cgc]+}|tt||�t||�zd�f��-}}t	|d�d��Scc}w)z�
    This function merge results previously given by the function coherence_ratio.
    The return type is the same as coherence_ratio.
    rjc��|dSrUrVrWs r+rYz(merge_coherence_ratios.<locals>.<lambda>|s
��q��t�r8TrZ)r/�round�sumr^r!)�results�per_language_ratios�result�
sub_resultr2rd�merges       r+�merge_coherence_ratiosr�cs���
35���8�� �	8�J�(�O�H�e��2�2�16��#�H�-����)�0�0��7�	8�8� ,�	
�
�

���'��1�2�S�9L�X�9V�5W�W��
�	
�	
�E�	
��%�^�T�:�:��	
s�0A:c���t��|D]6}|\}}|jdd�}|�vrg�|<�|j|��8t�fd��D��r*g}�D]!}|j|t	�|�f��#|S|S)u�
    We shall NOT return "English—" in CoherenceMatches because it is an alternative
    of "English". This function only keeps the best match and remove the em-dash in it.
    u—r�c3�@�K�|]}t�|�dkD���y�w)rN)r^)�.0�e�
index_resultss  �r+�	<genexpr>z/filter_alt_coherence_matches.<locals>.<genexpr>�s �����
<��3�}�Q�� �1�$�
<�s�)�dict�replacer/�any�max)r�r�r2rd�
no_em_name�filtered_resultsr�s      @r+�filter_alt_coherence_matchesr�s����
-1�F�M��0�� ���%�"�*�*�5�"�5�
��]�*�(*�M�*�%��j�!�(�(��/�0��
<�m�
<�<�-/��%�	N�H��#�#�X�s�=��3J�/K�$L�M�	N� ���Nr8c	�0�g}d}d}|�|jd�ng}d|vrd}|jd�t|�D]�}i}|D]}	|j|	d�dz||	<�t	|�}
|
t
kr�9t
|j�d�d��D�cgc]}|d��	}}|xst||�D]B}
t|
|�}||kr�|d	k\r|dz
}|j|
t|d
�f�|dk\s�B����t
t|�d�d��Scc}w)
z�
    Detect ANY language that can be identified in given sequence. The sequence will be analysed by layers.
    A layer = Character extraction by alphabets/ranges.
    Fr�,r;Trc��|dSrUrV)�items r+rYz!coherence_ratio.<locals>.<lambda>�s
��d�1�g�r8rZg�������?rjric��|dSrUrVrWs r+rYz!coherence_ratio.<locals>.<lambda>�s
��Q�q�T�r8)
�split�remover�ror^r
r!r.rfr�r/r�r�)r��	threshold�lg_inclusionr�r_�sufficient_match_count�lg_inclusion_list�layer�char_counts�layer_characterr&r��popular_character_orderedr2rds               r+�coherence_ratior��s|��(*�G�"��"#��3?�3K��*�*�3�/�QS���)�)���� � ��/�$�%5�6�#��')��$�	S�O�+6�?�?�?�A�+N�QR�+R�K��(�	S� #�5�z���0�0����!�!�#�)=�t��0
��
��G�0
�!�0
�*�
�-?�%�'7�.
�	�H�9��3��E��y� ���#��&�!�+�&��N�N�H�e�E�1�o�6�7�%��*��	�)#�J�$�W�-�>�4����10
s�D)r"�str�return�	list[str])r0r�r�r�)r2r�r�ztuple[bool, bool])F)r3r�r_�boolr�r�)r2r�rsr�r��float)r�r�r�r�)r�zlist[CoherenceMatches]r�r)r�rr�r)g�������?N)r�r�r�r�r�z
str | Noner�r)#�
__future__rr�codecsr�	functoolsr�constantrrr	r
rrr
�mdrrr�modelsr�utilsrrr,r7r?rKrRrfr�r�r�r�r�rVr8r+�<module>r�s	��"��%�����O�N�$��)�X�*��2�
�2�.���
��(�+�,�2�-�2�&5:�%I��%I�-1�%I��%I�PV>��V>�'0�V>�
�V>�rFA�R;�8�8OS�9��9�&+�9�AK�9��9r8

Youez - 2016 - github.com/yon3zu
LinuXploit