shell bypass 403

Cubjrnet7 Shell


name : utils.cpython-39.pyc
a

\n ^d�@s�ddlZddlmZmZmZddlmZdd�ej�	�D�Z
eed�dd	�Z
eeeefd
�dd�Zeeeeeeffd
�dd�Zeeeefeeeeeffeeefeeefd�dd�Zeeefed
�dd�Zeeefed
�dd�Zeeefeed
�dd�Zeeefed
�dd�Zeeeefed�dd�Zeeeed�dd �Zeed!�d"d#�Zd.eeed%�d&d'�Zeeeeed(�d)d*�Zd/eeed+�d,d-�ZdS)0�N)�Dict�List�Optional�)�configcCs&i|]\}}|dkrtjj||�qS)Znbsp)�htmlZentitiesZname2codepoint)�.0�k�v�r�3/usr/lib/python3.9/site-packages/html2text/utils.py�
<dictcomp>s�r
)�tag�returncCsD|ddkr@t|�dkr@|d}d|kr4dkr@nnt|�SdS)Nr�h�r�0�9)�len�int)r�nrrr�hn
s
r)�stylercCsdd�dd�|�d�D�D�S)z,
    :returns: A hash of css attributes
    cSs&i|]\}}|����|�����qSr)�strip�lower)r�x�yrrrr
s�z&dumb_property_dict.<locals>.<dictcomp>cSs g|]}d|vr|�dd��qS)�:r��split)r�zrrr�
<listcomp>�z&dumb_property_dict.<locals>.<listcomp>�;r�rrrr�dumb_property_dicts�r%)�datarcCs�|d7}|�d�}|dkrJ|d|�||�d|�dd�}|�d�}qdd�|�d	�D�}zd
d�|D�}Wnty�i}Yn0|S)z�
    :type data: str

    :returns: A hash of css selectors, each of which contains a hash of
    css attributes.
    :rtype: dict
    r#z@import���rrNcSs"g|]}d|��vr|�d��qS)�{)rr�rrrrrr!0r"z#dumb_css_parser.<locals>.<listcomp>�}cSsi|]\}}|��t|��qSr)rr%)r�a�brrrr
2r"z#dumb_css_parser.<locals>.<dictcomp>)�findr�
ValueError)r&ZimportIndex�pairs�elementsrrr�dumb_css_parsers	
$
r1)�attrs�	style_def�parent_stylercCs~|��}d|vrL|ddus J�|d��D]}|�d|i�}|�|�q,d|vrz|ddusdJ�t|d�}|�|�|S)z�
    :type attrs: dict
    :type style_def: dict
    :type style_def: dict

    :returns: A hash of the 'final' style attributes of the element
    :rtype: dict
    �classN�.r)�copyr�get�updater%)r2r3r4rZ	css_classZ	css_styleZimmediate_stylerrr�
element_style9s

r:cCs d|vr|d}|dvrdSdS)zh
    Finds out whether this is an ordered or unordered list

    :type style: dict

    :rtype: str
    zlist-style-type)ZdiscZcircleZsquareZnoneZulZolr)rZ
list_stylerrr�google_list_styleTs
r;cCsd|vS)z�
    Check if the style of the element has the 'height' attribute
    explicitly defined

    :type style: dict

    :rtype: bool
    Zheightrr$rrr�google_has_heightds	r<cCsJg}d|vr|�|d�d|vr0|�|d�d|vrF|�|d�|S)zk
    :type style: dict

    :returns: A list of all emphasis modifiers of the element
    :rtype: list
    ztext-decorationz
font-stylezfont-weight)�append)rZemphasisrrr�google_text_emphasispsr>cCs$d}d|vr|d}d|kp"d|kS)zu
    Check if the css of the current element defines a fixed width font

    :type style: dict

    :rtype: bool
    �zfont-familyzcourier newZconsolasr)rZfont_familyrrr�google_fixed_width_font�sr@)r2rcCsBd|vr>|ddusJ�zt|d�dWSty<Yn0dS)zh
    Extract numbering from list element attributes

    :type attrs: dict

    :rtype: int or None
    �startNrr)rr.)r2rrr�list_numbering_start�srB)�para�
wrap_links�wrap_list_itemsrcCs�|stj�|�rdS|dd�dks0|ddkr4dS|��}|dd�dkrht|�dkrh|ddkrhd	S|dd
�dvr�|dd�dks�|Sttj�|�p�tj�|��S)
NTr�z    �	rz--�-Fr)rH�*z**)	rZRE_LINK�search�lstripr�boolZRE_ORDERED_LIST_MATCHER�matchZRE_UNORDERED_LIST_MATCHER)rCrDrE�strippedrrr�skipwrap�s( 
�rO)�textrcCstj�d|�S)zU
    Escapes markdown-sensitive characters within other markdown
    constructs.
    �\\\1)rZRE_MD_CHARS_MATCHER�sub)rPrrr�	escape_md�srSF)rP�snobrcCsNtj�d|�}|r tj�d|�}tj�d|�}tj�d|�}tj�d|�}|S)zO
    Escapes markdown-sensitive characters across whole document sections.
    rQz\1\\\2)rZRE_MD_BACKSLASH_MATCHERrRZRE_MD_CHARS_MATCHER_ALLZRE_MD_DOT_MATCHERZRE_MD_PLUS_MATCHERZRE_MD_DASH_MATCHER)rPrTrrr�escape_md_section�srU)�lines�right_marginrc	s4�fdd�|d�d�D�}t|�}|D]�}dd�|�d�D�}t|�}||krd|dg||7}n0||kr�|�fdd�|||d�D�7}|}�fd	d�t||�D�}q(g}|D]x}d
d�|�d�D�}t|���td�k�rd��fd
d�t||�D�}nd��fdd�t||�D�}|�d�|��q�|S)zR
    Given the lines of a table
    padds the cells and returns the new lines
    csg|]}t|�����qSr)r�rstripr)�rWrrr!�r"z"reformat_table.<locals>.<listcomp>r�|cSsg|]}|���qSr�rXr)rrrr!�r"r?csg|]}t|���qSr)rr)rYrrr!�r"Ncs"g|]\}}tt|��|��qSr)�maxr)rrZold_lenrYrrr!�scSsg|]}|���qSrr[r)rrrr!�r"z-|rHcs,g|]$\}}|���|t|����qSr�rXr�rr�M��fillerrrr!�s�� cs,g|]$\}}|���|t|����qSrr]r^r`rrr!�s�)rr�zip�setrr=�join)	rVrWZ	max_widthZmax_cols�lineZcolsZnum_cols�	new_linesZnew_colsr)rarWr�reformat_table�s6$
�
�
�rh)rPrWrcCs||�d�}g}d}g}|D]V}tj|vrV|}|st||�}|�|�g}|�d�q|rf|�|�q|�|�qd�|�S)z0
    Provide padding for tables in the text
    �
Fr?)rrZTABLE_MARKER_FOR_PADrh�extendr=re)rPrWrVZtable_bufferZ
table_startedrgrf�tablerrr�pad_tables_in_texts"




rl)F)r)Z
html.entitiesr�typingrrrr?rZ	UNIFIABLE�itemsZunifiable_n�strrrr%r1r:r;rLr<r>r@rBrOrSrUrhrlrrrr�<module>s.�
 

�+

© 2025 Cubjrnet7