KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21571/root/usr/lib64/python2.4/email/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21571/root/usr/lib64/python2.4/email/Utils.pyo
mò
‚=5Dc@s·dZdkZdkZdkZdkZdkZdkZdkZdkl	Z	dk
lZdk
lZ
dk
lZdk
lZdk
lZdklZd	klZlZd
ZdZdZd
ZeidƒZeidƒZd„Z d„Z!d„Z"d„Z#d„Z$eidei%ei&BƒZ'de)e)d„Z*dd„Z+d„Zd„Zd„Z,d„Z-d„Z.ddd„Z/eidƒZ0d„Z1d d!d"„Z2dS(#sMiscellaneous utilities.N(sStringIO(squote(sAddressList(s	mktime_tz(s	parsedate(sparsedate_tz(sdecodestring(s_bencodes_qencodes, tus
s[][\\()<>@,:;".]s	[][\\()"]cCs|S(N(ts(R((t#/usr/lib64/python2.4/email/Utils.pyt	_identity)scCsO|p|Snti|ƒ}|idƒo|idƒo|d Sn|S(Ns
iÿÿÿÿ(Rtbase64tdecodestringtvaluetendswith(RR((Rt_bdecode-s!cCs.tidt|ƒ}tidt|ƒ}|S(s+Replace all line-ending characters with 
.s	(?<!\r)\ns\r(?!\n)N(tretsubtCRLFR(R((Rtfix_eols9scCsa|\}}|oJd}ti|ƒo
d}ntid|ƒ}d||||fSn|S(sThe inverse of parseaddr(), this takes a 2-tuple of the form
    (realname, email_address) and returns the string value suitable
    for an RFC 2822 From, To or Cc header.

    If the first element of pair is false, then the second element is
    returned unmodified.
    Rt"s\\\g<0>s%s%s%s <%s>N(tpairtnametaddresstquotest
specialsretsearcht	escapesreR
(RRRR((Rt
formataddrCs
cCs"ti|ƒ}t|ƒ}|iS(s7Return a list of (REALNAME, EMAIL) for each fieldvalue.N(t
COMMASPACEtjointfieldvaluestallt_AddressListtataddresslist(RRR((RtgetaddressesVss_
  =\?                   # literal =?
  (?P<charset>[^?]*?)   # non-greedy up to the next ? is the charset
  \?                    # literal ?
  (?P<encoding>[qb])    # either a "q" or a "b", case insensitive
  \?                    # literal ?
  (?P<atom>.*?)         # non-greedy up to the next ?= is the atom
  \?=                   # literal ?=
  c	CsX|d$jotiƒ}n|oti|ƒ}tio|do
ti}n
ti}t	t
|ƒdƒ\}}|djo
d}nd}d|||df}n'ti|ƒ}|o
d}nd	}d
ddd
ddddg|d|dddddddddddddg|d d |d|d!|d"|d#|fS(%sƒReturns a date string as specified by RFC 2822, e.g.:

    Fri, 09 Nov 2001 01:08:47 -0000

    Optional timeval if given is a floating point time value as accepted by
    gmtime() and localtime(), otherwise the current time is used.

    Optional localtime is a flag that when True, interprets timeval, and
    returns a date relative to the local timezone instead of UTC, properly
    taking daylight savings time into account.

    Optional argument usegmt means that the timezone is written out as
    an ascii string, not numeric one (so "GMT" instead of "+0000"). This
    is needed for HTTP, and is only used when localtime==False.
    iÿÿÿÿiit-t+s
%s%02d%02di<tGMTs-0000s"%s, %02d %s %04d %02d:%02d:%02d %stMontTuetWedtThutFritSattSuniitJantFebtMartAprtMaytJuntJultAugtSeptOcttNovtDeciiiiN(ttimevaltNonettimet	localtimetnowtdaylighttaltzonetoffsetttimezonetdivmodtabsthourstminutestsigntzonetgmtimetusegmt(	R4R7RDRBR;RAR?R8R@((Rt
formatdatejs$

	


cCsŒtiƒ}tidti|ƒƒ}tiƒ}ti	dƒ}|djo
d}nd|}t
iƒ}d|||||f}|S(sèReturns a string suitable for RFC 2822 compliant Message-ID, e.g:

    <20020201195627.33539.96671@nightshade.la.mastaler.com>

    Optional idstring if given is a string used to strengthen the
    uniqueness of the message id.
    s%Y%m%d%H%M%Si †Rt.s<%s.%s.%s%s@%s>N(R6R4tstrftimeRCtutcdatetostgetpidtpidtrandomt	randrangetrandinttidstringR5tsockettgetfqdntidhosttmsgid(RORHRNRSRKR4RR((Rt
make_msgidŸs


cCs|pdSnt|ƒS(N(tdataR5t
_parsedate(RU((Rt	parsedate¸scCs|pdSnt|ƒS(N(RUR5t
_parsedate_tz(RU((Rtparsedate_tz¾scCs&t|ƒi}|pdSn|dS(NRi(RR(RtaddrRtaddrs(RZR[((Rt	parseaddrÄscCs‘t|ƒdjoz|idƒo7|idƒo'|dd!iddƒiddƒSn|idƒo|idƒo|dd!Sqn|S(
sRemove quotes from a string.iR
iÿÿÿÿs\\s\s\"t<t>N(tlentstrt
startswithRtreplace(R`((RtunquoteÌs ' cCsmdk}|iddƒ}t|ƒdjodd|i|ƒfSn|\}}}|||i|ƒfS(s#Decode string according to RFC 2231Nt'ii(	turllibRtsplittpartsR_R5Rctcharsettlanguage(RRiRhRgRe((Rtdecode_rfc2231Øs	cCshdk}|i|ddƒ}|djo|djo|Sn|djo
d}nd|||fS(sÜEncode string according to RFC 2231.

    If neither charset nor language is given, then s is returned as-is.  If
    charset is given but not language, the string is encoded using the empty
    string for language.
    NtsafeRs%s'%s'%s(RetquoteRRhR5Ri(RRhRiRe((Rtencode_rfc2231âs	

s&^(?P<name>\w+)\*((?P<num>[0-9]+)\*?)?$cCs‹g}h}
|d\}}|i||fƒxµ|dD]©\}}t|ƒ}ti|ƒ}|o^|i
ddƒ\}}|dj	ot
|ƒ}n|
i|gƒ}	|	i||fƒq:|i|dt|ƒfƒq:W|
o™x–|
iƒD]„\}}g}|iƒx!|D]\}}|i|ƒqWtti|ƒƒ\}}}|i|||dt|ƒffƒqûWn|S(sDecode parameters list according to RFC 2231.

    params is a sequence of 2-tuples containing (content type, string value).
    iiRtnums"%s"N(t
new_paramstrfc2231_paramstparamsRRtappendRctrfc2231_continuationtmatchtmotgroupRnR5tintt
setdefaulttrfc2231_param1Rltitemst
continuationstsorttcontinuationRjtEMPTYSTRINGRRhRi(RqRRiRoRuRhRR{RnRyRpR}((Rt
decode_paramsôs6
!

.Rbsus-asciicCs}t|tƒo_t|dƒ}|dpd}yt|||ƒSWqytj
ot|||ƒSqyXnt|ƒSdS(Niisus-ascii(
t
isinstanceRttupleRctrawvalRhtunicodeterrorstLookupErrortfallback_charset(RR„R†R‚Rh((Rtcollapse_rfc2231_values(3t__doc__RIR	R6RRLRPtwarningst	cStringIOtStringIOtemail._parseaddrRltAddressListRt	mktime_tzRWRVRYRXtquopriRt_qdecodetemail.Encoderst_bencodet_qencodeRR~tUEMPTYSTRINGRtcompileRRRRRRRtVERBOSEt
IGNORECASEtecreR5tFalseRERTR\RcRjRmRsRR‡('RWRcR”R“RLR‡RRRRRRTR	RYRERRRsRjRRR‰RlRmRRR’R\R˜RPR‹RIRR~R6RVRXRŽR((Rt?sL							






			
		5					
	$

Anon7 - 2021