HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python3.5/email/__pycache__/feedparser.cpython-35.pyc


FaY@sdZddgZddlZddlmZddlmZddlmZddlm	Z	dd	l
mZejd
Z
ejdZejdZejdZejd
ZdZdZeZGdddeZGdddZGdddeZdS)aFeedParser - An email feed parser.

The feed parser implements an interface for incrementally parsing an email
message, line by line.  This has advantages for certain applications, such as
those reading email messages off a socket.

FeedParser.feed() is the primary interface for pushing new data into the
parser.  It returns when there's nothing more it can do with the available
data.  When you have no more data to push into the parser, call .close().
This completes the parsing and returns the root message object.

The other advantage of this parser is that it will never raise a parsing
exception.  Instead, when it finds something unexpected, it adds a 'defect' to
the current message.  Defects are just instances that live on the message
object's .defects attribute.

FeedParserBytesFeedParserN)errors)message)compat32)deque)StringIOz
|
|
z(
|
|
)z
(
|
|
)\Zz%^(From |[\041-\071\073-\176]*:|[\t ])
c@seZdZdZddZddZddZdd	Zd
dZdd
Z	ddZ
ddZddZddZ
dS)BufferedSubFileakA file-ish object that can have new data loaded into it.

    You can also push and pop line-matching predicates onto a stack.  When the
    current predicate matches the current line, a false EOF response
    (i.e. empty string) is returned instead.  This lets the parser adhere to a
    simple abstraction -- it parses until EOF closes the current message.
    cCs4tdd|_t|_g|_d|_dS)Nnewliner	F)r_partialr_lines	_eofstack_closed)selfr&/usr/lib/python3.5/email/feedparser.py__init__6s	zBufferedSubFile.__init__cCs|jj|dS)N)rappend)rZpredrrrpush_eof_matcherAsz BufferedSubFile.push_eof_matchercCs
|jjS)N)rpop)rrrrpop_eof_matcherDszBufferedSubFile.pop_eof_matchercCsP|jjd|j|jj|jjd|jjd|_dS)NrT)r
seek	pushlines	readlinestruncater)rrrrcloseGs

zBufferedSubFile.closecCsg|js|jrdStS|jj}x7t|jD]&}||r9|jj|dSq9W|S)Nr	)rrNeedMoreDatapopleftreversedr
appendleft)rlineZateofrrrreadlineOs		zBufferedSubFile.readlinecCs&|tk	st|jj|dS)N)rAssertionErrorrr!)rr"rrr
unreadlineaszBufferedSubFile.unreadlinecCs|jj|d|kr,d|kr,dS|jjd|jj}|jjd|jj|djds|jj|j|j|dS)z$Push some new data into this object.r

Nr)r
writerrrendswithrr)rdatapartsrrrpushfs
zBufferedSubFile.pushcCs|jj|dS)N)rextend)rlinesrrrr{szBufferedSubFile.pushlinescCs|S)Nr)rrrr__iter__~szBufferedSubFile.__iter__cCs"|j}|dkrt|S)Nr	)r#
StopIteration)rr"rrr__next__szBufferedSubFile.__next__N)__name__
__module____qualname____doc__rrrrr#r%r-rr0r2rrrrr.src@seZdZdZddeddZddZdd	Zd
dZdd
Z	ddZ
ddZddZddZ
dS)rzA feed-style parser of email.NpolicycCs||_d|_|dkrK|jtkr<tj|_qtj|_n;||_y|d|jWntk
rd|_YnXt|_	g|_
|jj|_
d|_d|_d|_dS)a_factory is called with no arguments to create a new message obj

        The policy keyword specifies a policy object that controls a number of
        aspects of the parser's operation.  The default policy maintains
        backward compatibility.

        FNr7T)r7_old_style_factoryrrZMessage_factoryZEmailMessage	TypeErrorr_input	_msgstack	_parsegenr2_parse_cur_last_headersonly)rr9r7rrrrs"			
			zFeedParser.__init__cCs
d|_dS)NT)rA)rrrr_set_headersonlyszFeedParser._set_headersonlycCs|jj||jdS)zPush more data into the parser.N)r;r-_call_parse)rr+rrrfeedszFeedParser.feedcCs'y|jWntk
r"YnXdS)N)r>r1)rrrrrCs
zFeedParser._call_parsecCsu|jj|j|j}|js3t|jdkrq|jrqtj	}|j
j|||S)z<Parse all remaining data and return the root message object.	multipart)r;rrC_pop_messager<r$get_content_maintypeZis_multipartrZ!MultipartInvariantViolationDefectr7
handle_defect)rrootdefectrrrrs


zFeedParser.closecCs|jr|j}n|jd|j}|jrX|jjdkrX|jd|jru|jdj||jj|||_||_	dS)Nr7zmultipart/digestzmessage/rfc822r'r()
r8r9r7r?get_content_typeZset_default_typer<Zattachrr@)rmsgrrr_new_messages	
		zFeedParser._new_messagecCs8|jj}|jr+|jd|_n	d|_|S)Nr'r()r<rr?)rretvalrrrrFs
		zFeedParser._pop_messageccs|jg}x|jD]x}|tkr4tVqtj|stj|stj}|jj	|j
||jj|P|j|qW|j
||jrg}xA|jj}|tkrtVq|dkrP|j|qW|j
jtj|dS|j
jdkrx|jjtjx)|jD]}|tkretVqKPqKW|j}|jjx(|jj}|tkrtVqPqWx(|jj}|tkrtVqPqW|dkrP|jj|q+WdS|j
jdkrMx)|jD]}|tkr:tVq Pq W|jdS|j
jdkr|j
j}|dkrtj}|jj	|j
|g}x2|jD]'}|tkrtVq|j|qW|j
jtj|dS|j
jddjdkr:tj}|jj	|j
|d	|}tjd
tj |d}	d}
g}d
}d
}
x|jj}|tkrtVq|dkrP|	j|}|r|j!drd}
|j!d}P|
rf|rM|d}t"j#|}|r8|dt$|j!d|d<tj||j
_%d
}
|jj|qxM|jj}|tkrtVqi|	j|}|si|jj|PqiW|jj|	jx)|jD]}|tkrtVqPqW|j&jdkr|j&j'}|dkr1d|j&_'q|dk	rt"j#|}|rt$|j!d}|d||j&_'n\|j&j(}t)|t*rt"j#|}|r|dt$|j!d}||j&_(|jj|j|j
|_&q|
st+|j|qW|
rtj,}|jj	|j
||j
jtj|g}x%|jD]}|tkrqtVqqqqWtj||j
_'dS|
stj-}|jj	|j
|dS|rdg}ng}x2|jD]'}|tkrtVq|j|qW|ri|d}t.j|}|ri|t$|j!dd|d<tj||j
_'dSg}x2|jD]'}|tkrtVq|j|qW|j
jtj|dS)Nr	zmessage/delivery-statusrrEzcontent-transfer-encoding8bit7bitbinaryz--z(?P<sep>z4)(?P<end>--)?(?P<ws>[ \t]*)(?P<linesep>\r\n|\r|\n)?$TFendlinesepr'r)rPrOrQr(r()/rMr;rheaderREmatchNLCRErZ MissingHeaderBodySeparatorDefectr7rHr?r%r_parse_headersrAr#Zset_payloadEMPTYSTRINGjoinrKrr=rFrrGZget_boundaryZNoBoundaryInMultipartDefectgetlowerZ-InvalidMultipartContentTransferEncodingDefectrecompileescapegroup	NLCRE_eolsearchlenpreambler@epilogueZ_payload
isinstancestrr$ZStartBoundaryNotFoundDefectZCloseBoundaryNotFoundDefect	NLCRE_bol)rZheadersr"rJr/rNrLboundaryZ	separatorZ
boundaryreZcapturing_preamblercrSZclose_boundary_seenmoZlastlineZeolmordrRZpayload	firstlineZbolmorrrr=sh

	

	


$ 


#zFeedParser._parsegenc	Csd}g}xt|D]\}}|ddkrs|sctj|}|jj|j|q|j|q|r|jj|jj|dg}}|j	drW|dkrt
j|}|r|dt|j
d}|jj|qnO|t|dkr2|jj|dStj|}|jjj|q|jd}|dkrtjd}|jjj|q|dkstd|d|}|g}qW|r|jj|jj|dS)	Nr	rz 	zFrom r':zMissing header name.z3_parse_headers fed line with no : and no leading WS)	enumeraterZ#FirstHeaderLineIsContinuationDefectr7rHr?rZset_rawZheader_source_parse
startswithr`rarbr_Zset_unixfromr;r%ZMisplacedEnvelopeHeaderDefectZdefectsfindZInvalidHeaderDefectr$)	rr/Z
lastheaderZ	lastvaluelinenor"rJriirrrrWsH

 
zFeedParser._parse_headers)r3r4r5r6rrrBrDrCrrMrFr=rWrrrrrs!

cs(eZdZdZfddZS)rz(Like FeedParser, but feed accepts bytes.cs tj|jdddS)Nasciisurrogateescape)superrDdecode)rr+)	__class__rrrDszBytesFeedParser.feed)r3r4r5r6rDrr)rurrs)r6__all__r\ZemailrrZemail._policybasercollectionsriorr]rVrgr`ZNLCRE_crackrTrXNLobjectrrrrrrrr<module>s&	[