Hacked By AnonymousFox
B
YI~d&^ � @ s� d ddgZ ddlZddlZddlZddlZddlmZ ddlmZ e j
Z
dZdZd Z
d
ZdZdZd
Ze
d�Ze
d�Ze�dejejB �Ze�d�Ze�d�ZejjZdd� Zddd�ZG dd � d �ZG dd� d�ZG dd� de �Z!dS )�Header�
decode_header�make_header� N)�HeaderParseError)�charset�
� � z � �N z zus-asciizutf-8ai
=\? # literal =?
(?P<charset>[^?]*?) # non-greedy up to the next ? is the charset
\? # literal ?
(?P<encoding>[qQbB]) # either a "q" or a "b", case insensitive
\? # literal ?
(?P<encoded>.*?) # non-greedy up to the next ?= is the encoded string
\?= # literal ?=
z[\041-\176]+:$z
\n[^ \t]+:c C s� t | d�rdd� | jD �S t�| �s.| d fgS g }x�| �� D ]�}t�|�}d}xp|r�|�d�}|rn|�� }d}|r�|�|d d f� |rP|�d�� � }|�d�� � }|�d�}|�|||f� qPW q<W g } xVt
|�D ]J\}
}|
dkr�|d r�||
d d r�||
d d �� r�| �|
d � q�W xt| �D ]}||= �q*W g }
x�|D ]�\}}}|d k�rh|
�||f� n�|d k�r�t
j�|�}|
�||f� n~|d
k�r t|�d }|�r�|dd d| � 7 }yt
j�|�}W n tjk
�r� td
��Y nX |
�||f� ntd| ���qDW g }d }}x~|
D ]v\}}t|t��rBt|d�}|d k�rV|}|}nB||k�rx|�||f� |}|}n |d k�r�|t| 7 }n||7 }�q$W |�||f� |S )N�_chunksc S s( g | ] \}}t �|t|��t|�f�qS � )�_charsetZ_encode�str)�.0�stringr r
r
�1/opt/alt/python37/lib64/python3.7/email/header.py�
<listcomp>M s z!decode_header.<locals>.<listcomp>Tr F� � �q�b� z===zBase64 decoding errorzUnexpected encoding: zraw-unicode-escape)�hasattrr �ecre�search�
splitlines�split�pop�lstrip�append�lower� enumerate�isspace�reversed�email�
quoprimimeZ
header_decode�lenZ
base64mime�decode�binascii�Errorr �AssertionError�
isinstancer �bytes�BSPACE)�headerZwords�line�parts�firstZ unencodedr �encodingZencodedZdroplist�n�w�dZ
decoded_wordsZencoded_stringZwordZpaderrZ collapsedZ last_word�last_charsetr
r
r r = sz
4
c C sJ t |||d�}x6| D ].\}}|d k r6t|t�s6t|�}|�||� qW |S )N)�
maxlinelen�header_name�continuation_ws)r r, �Charsetr )Zdecoded_seqr8 r9 r: �h�sr r
r
r r � s c @ sJ e Zd Zddd�Zdd� Zdd � Zdd
d�Zdd
� Zddd�Zdd� Z dS )r Nr �strictc C s| |d krt }nt|t�s t|�}|| _|| _g | _|d k rH| �|||� |d krTt}|| _|d krjd| _ nt
|�d | _ d S )Nr r )�USASCIIr, r; r �_continuation_wsr r �
MAXLINELEN�_maxlinelen�
_headerlenr'