⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.144
Server IP:
157.245.143.252
Server:
Linux www 6.11.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 14 13:19:59 UTC 2024 x86_64
Server Software:
nginx/1.26.0
PHP Version:
8.3.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
lib
/
python3.12
/
email
/
__pycache__
/
View File Name :
header.cpython-312.pyc
CRh^ d Z g dZddlZddlZddlZddlZddlmZ ddlm Z e j ZdZdZ dZd Zd ZdZdZ ed Z ed Z ej* dej, ej. z Z ej* d Z ej* d Zej6 j8 Zd Z ddZ G d d Z G d d Z G d de! Z"y)z+Header encoding and decoding functionality.)Header decode_headermake_header N)HeaderParseError)charset z N z us-asciizutf-8ai =\? # literal =? (?P
[^?]*?) # non-greedy up to the next ? is the charset \? # literal ? (?P
[qQbB]) # either a "q" or a "b", case insensitive \? # literal ? (?P
.*?) # non-greedy up to the next ?= is the encoded string \?= # literal ?= z[\041-\176]+:$z \n[^ \t]+:c t | d rG| j D cg c]/ \ }}t j |t | t | f1 c}}S t j | s| dfgS g }| j D ] }t j | }d}|s|j d }|r|j }d}|r|j |ddf |rc|j d j }|j d j }|j d } |j | ||f |r g } t | D ]K \ }}|dkD s|d s||dz d s||dz d j s8| j |dz M t | D ] } || = g }|D ] \ }}}||j ||f |dk( r3t j" j% | }|j ||f U|d k( rOt' | d z }|r|ddd |z z } t j( j+ | }|j ||f t3 d |z g }dx}}|D ]Y \ }}t5 |t rt7 |d }||}|})||k7 r|j ||f |}|}F| |t8 |z z }U||z }[ |j ||f |S c c}}w # t, j. $ r t1 d w xY w)a; Decode a message header value without converting charset. Returns a list of (string, charset) pairs containing each of the decoded parts of the header. Charset is None for non-encoded parts of the header, otherwise a lower-case string containing the name of the character set specified in the encoded string. header may be a string that may or may not contain RFC2047 encoded words, or it may be a Header object. An email.errors.HeaderParseError may be raised when certain decoding error occurs (e.g. a base64 decoding exception). _chunksNTr F qb z===zBase64 decoding errorzUnexpected encoding: zraw-unicode-escape)hasattrr _charset_encodestrecresearch splitlinessplitpoplstripappendlower enumerateisspacereversedemail quoprimime header_decodelen base64mimedecodebinasciiErrorr AssertionError isinstancebytesBSPACE)headerstringr wordslinepartsfirst unencodedencodingencodeddroplistnwd decoded_wordsencoded_stringwordpaderr collapsed last_wordlast_charsets #/usr/lib/python3.12/email/header.pyr r ; s8 vy!+1>>;+9 !!g,7WF+9; ; ;;v E!!# 4 !I%,,. it45))A,,,. 99Q<--/))A,gx9: $" H% 1Q31Q4E!A#JqMeAaCjm.C.C.EOOAaC ! h !H M-2)' .'!:; _##11.AD $1 _(1,F%V"44 6''..~> $$dG_5 !88!CDD% .3* I##I& gdC 34DI"L $i67I"L !$&II ' i./W;d >> @&'>?? @s 4K%*K++L c t ||| }| D ]4 \ }}|t |t st | }|j || 6 |S )a Create a Header from a sequence of pairs as returned by decode_header() decode_header() takes a header value string and returns a sequence of pairs of the format (decoded_string, charset) where charset is the string name of the character set. This function takes one of those sequence of pairs and returns a Header instance. Optional maxlinelen, header_name, and continuation_ws are as in the Header constructor. ) maxlinelenheader_namecontinuation_ws)r r- Charsetr )decoded_seqrF rG rH hsr s rD r r sQ *+. 0A! 7z'7'Cg&G G " H c B e Zd Z d dZd Zd Zd dZd ZddZd Z y)r Nc |t }nt |t st | }|| _ || _ g | _ || j ||| |t }|| _ |d| _ yt | dz | _ y)aD Create a MIME-compliant header that can contain many character sets. Optional s is the initial header value. If None, the initial header value is not set. You can later append to the header with .append() method calls. s may be a byte string or a Unicode string, but see the .append() documentation for semantics. Optional charset serves two purposes: it has the same meaning as the charset argument to the .append() method. It also sets the default character set for all subsequent .append() calls that omit the charset argument. If charset is not provided in the constructor, the us-ascii charset is used both as s's initial charset and as the default for subsequent .append() calls. The maximum line length can be specified explicitly via maxlinelen. For splitting the first line to a shorter value (to account for the field header which isn't included in s, e.g. `Subject') pass in the name of the field in header_name. The default maxlinelen is 78 as recommended by RFC 2822. continuation_ws must be RFC 2822 compliant folding whitespace (usually either a space or a hard tab) which will be prepended to continuation lines. errors is passed through to the .append() call. Nr r )USASCIIr- rI r _continuation_wsr r MAXLINELEN_maxlinelen _headerlenr' )selfrL r rF rG rH errorss rD __init__zHeader.__init__ s : ?GGW-g&G /=KK7F+#J%DO "+.2DOrM c | j g }d}d}| j D ] \ }}|}|t j k( r$|j dd }|j dd }|rU|xr | j |d }|dvr|dv r5|s3|j t d}n|dvr|s|j t |xr | j |d }|}|j | t j | S )z&Return the string value of the header.Nasciisurrogateescapereplacer Nr ) _normalizer r UNKNOWN8BITencoder) _nonctextr SPACEEMPTYSTRINGjoin) rU uchunkslastcs lastspacer1 r nextcsoriginal_byteshasspaces rD __str__zHeader.__str__ s #||OFG F---!'w8I!J'..w B!?dnnVAY&?!33!33Hu-!%#55iNN5)=4>>&*#=IFNN6"+ ,, ((rM c |t | k( S N)r )rU others rD __eq__z Header.__eq__ s D !!rM c | | j }nt |t st | }t |t sH|j xs d}|t j k( r|j dd }n|j || }|j xs d}|t j k7 r |j || | j j ||f y# t $ r |dk7 r t }Y 5w xY w)a. Append a string to the MIME header. Optional charset, if given, should be a Charset instance or the name of a character set (which will be converted to a Charset instance). A value of None (the default) means that the charset given in the constructor is used. s may be a byte string or a Unicode string. If it is a byte string (i.e. isinstance(s, str) is false), then charset is the encoding of that byte string, and a UnicodeError will be raised if the string cannot be decoded with that charset. If s is a Unicode string, then charset is a hint specifying the character set of the characters in the string. In either case, when producing an RFC 2822 compliant header using RFC 2047 rules, the string will be encoded using the output codec of the charset. If the string cannot be encoded to the output codec, a UnicodeError will be raised. Optional `errors' is passed as the errors argument to the decode call if s is a byte string. Nr rZ ) r r- rI r input_codecr_ r) output_codecr` UnicodeEncodeErrorUTF8r r )rU rL r rV input_charsetoutput_charsets rD r z Header.append s * ?mmGGW-g&G!S!#//=:M 4 44HHZ):;HH]F3 !--;X111 0 QL) &