�ɲɾ�����ӯ�����һ��ˣ��������С���˴��ͣ�������P���ҹ��ñ˽��ά�Բ��������˸߸ԣ�������ơ��ҹ��ñ�����ά�Բ���ˡ���˳^�ӣ������ӡ� ���ͯj�ӣ��ƺ���ӣ� ? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!PK{3]o\DEmonitor_disk.cpython-36.pycnu[3 sPK{3]m7monitor_net.cpython-36.pycnu[3 \}}td|d|}|jj|j||<WdQRXqWdS)NZrx_bytesZ rx_packetsZtx_bytesZ tx_packetsz/sys/class/net/z /statistics/) enumerateopenreadstripr )r rr ifZstatfilerrr _updateStats zNetMonitor._updateStatcCsx|jD]}|j|qWdS)N)Z_updating_devicesr)r Zdevicerrrupdate$s zNetMonitor.updateN)__name__ __module__ __qualname__ classmethodrrrrrrrrrs  r) Ztuned.monitorsZtunedrreZtuned.utils.nettoolrZmonitorsZMonitorrrrrrs PK{3]{K{{__init__.cpython-36.opt-1.pycnu[3 \@sdS)Nrrr(/usr/lib64/python3.6/lib2to3/__init__.pysPK{3]R5?Lrepository.cpython-36.opt-1.pycnu[3 s   PK{3]oM  !monitor_load.cpython-36.opt-1.pycnu[3 sPK{3]oM  monitor_load.cpython-36.pycnu[3 sPK{3]ٿrepository.cpython-36.pycnu[3 s   PK{3]m7 monitor_net.cpython-36.opt-1.pycnu[3 \}}td|d|}|jj|j||<WdQRXqWdS)NZrx_bytesZ rx_packetsZtx_bytesZ tx_packetsz/sys/class/net/z /statistics/) enumerateopenreadstripr )r rr ifZstatfilerrr _updateStats zNetMonitor._updateStatcCsx|jD]}|j|qWdS)N)Z_updating_devicesr)r Zdevicerrrupdate$s zNetMonitor.updateN)__name__ __module__ __qualname__ classmethodrrrrrrrrrs  r) Ztuned.monitorsZtunedrreZtuned.utils.nettoolrZmonitorsZMonitorrrrrrs PK{3]o\DE!monitor_disk.cpython-36.opt-1.pycnu[3 sPK{3]Nbase.cpython-36.opt-1.pycnu[3 ysz$Monitor.get_load..)dictlistritems)rr)rrget_loadxszMonitor.get_loadcCs|jj|dS)N)rget)rr%rrrget_device_load{szMonitor.get_device_load)N)__name__ __module__ __qualname____doc__ classmethodrr rrrrrrrr r"r!propertyrsetterr&r'r-r/rrrrrs&           )Z tuned.logsZtunedZlogsr.r __all__objectrrrrrs PK{3]{K{{__init__.cpython-36.pycnu[3 \@sdS)Nrrr(/usr/lib64/python3.6/lib2to3/__init__.pysPK{3]+t|tst|tst||jkr:|jj||jj|dS)N)r r'r(r r%rr)r!r)rrr remove_devicers  zMonitor.remove_devicecs tfddtjjDS)Ncsg|]}|djkr|qS)r)r%).0Zdev_load)r!rr ysz$Monitor.get_load..)dictlistritems)r!r)r!rget_loadxszMonitor.get_loadcCs|jj|dS)N)rget)r!r)rrrget_device_load{szMonitor.get_device_load)N)__name__ __module__ __qualname____doc__ classmethodrr rrrrrrrr"r$r#propertyrsetterr*r+r1r3rrrrrs&           )Z tuned.logsZtunedZlogsr2r __all__objectrrrrrs PKc3]RVV"python-config.cpython-36.opt-2.pycnu[3 tj@s(ddlZddlZddlZddlZdddddddd d d g Zd-d dZy ejejd dde\ZZWnej k r~eYnXeseej dZ ej Z ddeDZ de kreddxfe D]\Zedkreej dqedkreej dqed.krLdejddejdgZedkrsz"exit_with_usage..)file)printformatsysargvjoin valid_optsstderrexit)coderrr exit_with_usages&rVERSIONcCsg|] \}}|qSrr)r flagvalrrr srz--help)rz--prefixz --exec-prefix exec_prefix --includes--cflagsz-Iinclude platincludeCFLAGS --libs --ldflagsz-lpythonLIBSSYSLIBSPy_ENABLE_SHAREDz-LLIBPLPYTHONFRAMEWORK LINKFORSHAREDz--extension-suffix EXT_SUFFIXz --abiflagsz --configdir)r)rr)r$r%)Zgetoptosr sysconfigrrrZoptsargserrorget_config_varZpyverZgetvarZ opt_flagsr rget_pathflagsextendsplitrrrinsertrrrr sX                 PKc3]RVVpython-config.cpython-36.pycnu[3 tj@s(ddlZddlZddlZddlZdddddddd d d g Zd-d dZy ejejd dde\ZZWnej k r~eYnXeseej dZ ej Z ddeDZ de kreddxfe D]\Zedkreej dqedkreej dqed.krLdejddejdgZedkrsz"exit_with_usage..)file)printformatsysargvjoin valid_optsstderrexit)coderrr exit_with_usages&rVERSIONcCsg|] \}}|qSrr)r flagvalrrr srz--help)rz--prefixz --exec-prefix exec_prefix --includes--cflagsz-Iinclude platincludeCFLAGS --libs --ldflagsz-lpythonLIBSSYSLIBSPy_ENABLE_SHAREDz-LLIBPLPYTHONFRAMEWORK LINKFORSHAREDz--extension-suffix EXT_SUFFIXz --abiflagsz --configdir)r)rr)r$r%)Zgetoptosr sysconfigrrrZoptsargserrorget_config_varZpyverZgetvarZ opt_flagsr rget_pathflagsextendsplitrrrinsertrrrr sX                 PKc3]RVV"python-config.cpython-36.opt-1.pycnu[3 tj@s(ddlZddlZddlZddlZdddddddd d d g Zd-d dZy ejejd dde\ZZWnej k r~eYnXeseej dZ ej Z ddeDZ de kreddxfe D]\Zedkreej dqedkreej dqed.krLdejddejdgZedkrsz"exit_with_usage..)file)printformatsysargvjoin valid_optsstderrexit)coderrr exit_with_usages&rVERSIONcCsg|] \}}|qSrr)r flagvalrrr srz--help)rz--prefixz --exec-prefix exec_prefix --includes--cflagsz-Iinclude platincludeCFLAGS --libs --ldflagsz-lpythonLIBSSYSLIBSPy_ENABLE_SHAREDz-LLIBPLPYTHONFRAMEWORK LINKFORSHAREDz--extension-suffix EXT_SUFFIXz --abiflagsz --configdir)r)rr)r$r%)Zgetoptosr sysconfigrrrZoptsargserrorget_config_varZpyverZgetvarZ opt_flagsr rget_pathflagsextendsplitrrrinsertrrrr sX                 PK3][ݥ__init__.cpython-311.opt-2.pycnu[ !A?h4ddlZejdeddS)NzGlib2to3 package is deprecated and may not be able to parse Python 3.10+) stacklevel)warningswarnDeprecationWarning=/opt/alt/python-internal/lib64/python3.11/lib2to3/__init__.pyr s> Mr PK3](׸QQ__main__.cpython-311.opt-1.pycnu[ !A?hCLddlZddlmZejeddS)N)mainz lib2to3.fixes)sysrexit=/opt/alt/python-internal/lib64/python3.11/lib2to3/__main__.pyr sB o  rPK3][ݥ__init__.cpython-311.pycnu[ !A?h4ddlZejdeddS)NzGlib2to3 package is deprecated and may not be able to parse Python 3.10+) stacklevel)warningswarnDeprecationWarning=/opt/alt/python-internal/lib64/python3.11/lib2to3/__init__.pyr s> Mr PK3](׸QQ__main__.cpython-311.pycnu[ !A?hCLddlZddlmZejeddS)N)mainz lib2to3.fixes)sysrexit=/opt/alt/python-internal/lib64/python3.11/lib2to3/__main__.pyr sB o  rPK3][ݥ__init__.cpython-311.opt-1.pycnu[ !A?h4ddlZejdeddS)NzGlib2to3 package is deprecated and may not be able to parse Python 3.10+) stacklevel)warningswarnDeprecationWarning=/opt/alt/python-internal/lib64/python3.11/lib2to3/__init__.pyr s> Mr PK3](׸QQ__main__.cpython-311.opt-2.pycnu[ !A?hCLddlZddlmZejeddS)N)mainz lib2to3.fixes)sysrexit=/opt/alt/python-internal/lib64/python3.11/lib2to3/__main__.pyr sB o  rPK3]|yycookiejar.cpython-311.opt-2.pycnu[ !A?h. gdZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl mZdZdadZdZdZee jjZejdZd Zd Zd Zd Zd ZgdZgdZ de DZ!dKdZ"dKdZ#dddddZ$ejdej%Z&dZ'dZ(ejdej%Z)ejdej*ej%zZ+ejdej,ej%zZ-dZ.ejdej,ej%zZ/dZ0dZ1ejdZ2ejdZ3ejd Z4ejd!Z5d"Z6ejd#Z7d$Z8d%Z9d&Z:ejd'ej%Z;d(Zd+Z?ejd,ej%Z@d-ZAd.ZBd/ZCd0ZDd1ZEejd2ZFd3ZGd4ZHd5ZId6ZJGd7d8ZKGd9d:ZLGd;dd?ZOGd@dAZPGdBdCeQZRGdDdEePZSdFZTGdGdHeSZUGdIdJeSZVdS)L)Cookie CookieJar CookiePolicyDefaultCookiePolicy FileCookieJar LWPCookieJar LoadErrorMozillaCookieJarN)timegmFcptsdStsddl}|datj|S)Nr zhttp.cookiejar)debugloggerlogging getLogger)argsrs ;/opt/alt/python-internal/lib64/python3.11/http/cookiejar.py_debugr,sA  5""#344 < HTTPOnlyz #HttpOnly_z#( Netscape)? HTTP Cookie FilezQa filename was not supplied (nor was the CookieJar instance initialised with one)zr# Netscape HTTP Cookie File # http://curl.haxx.se/rfc/cookie_spec.html # This is a generated file! Do not edit. cddl}ddl}ddl}|}|d||}|d|zddS)Nr zhttp.cookiejar bug! %s) stacklevel)iowarnings tracebackStringIO print_excgetvaluewarn)rrrfmsgs r_warn_unhandled_exceptionr"Bsz#""""""""""" A a   **,,C MM+c1aM@@@@@ric|dd\}}}}}}|tkr_d|cxkrdkrRnnOd|cxkrdkrBnn?d|cxkrdkr2nn/d|cxkrdkr"nnd|cxkrdkrnnt|SdS) N r ;=) EPOCH_YEARr )ttyearmonthmdayhourminsecs r_timegmr3Qs(*2A2%D%tS#   !u"2"2"2"2"2"2"2"2"2db dbqC~~~~2~~~~~ANNNNNNNNNbzztr)MonTueWedThuFriSatSun) JanFebMarAprMayJunJulAugSepOctNovDecc6g|]}|S)lower).0r.s r rK\s 222% 222rc |tj}ntj|}d|j|j|j|j|j|jfzS)Nz%04d-%02d-%02d %02d:%02d:%02dZ) datetimeutcnowutcfromtimestampr-r.dayr0minutesecondtdts r time2isozrV^sh  y   % % ' '   / / 2 2 + 2627BIry/B BBrc. |tj}ntj|}dt||jt |jdz |j|j |j |j fzS)Nz#%s, %02d-%s-%04d %02d:%02d:%02d GMTr%) rMrNrODAYSweekdayrPMONTHSr.r-r0rQrRrSs r time2netscaper[qs~  y   % % ' '   / / 2 2 0 RZZ\\BFF28A:$6 ")RY40 00r)GMTUTCUTZz^([-+])?(\d\d?):?(\d\d)?$cVd}|tvrd}nt|}|r~dt|dz}|dr(|dt|dzz}|ddkr| }|S)Nr ir<r%-) UTC_ZONES TIMEZONE_REsearchintgroup)tzoffsetms roffset_from_tz_stringrls F Y   r " "  !C OO+Fwwqzz 7"s1771::"66wwqzzS    Mrc .t|}|tjkrdS t|dz}nI#t $r< t|}n#t $rYYdSwxYwd|cxkrdkrnn|}nYdSYnwxYw|d}|d}|d}t|}t|}t|}t|}|dkrctjtjd}|dz} |} ||z| z }| | z } t| dkr| dkr|dz}n|dz }t|||||||f} | 0|d}| }t|} | dS| | z } | S)Nr%r&r id2r]) rgrMMAXYEAR MONTHS_LOWERindexrI ValueErrortime localtimeabsr3upperrl) rPmonyrhrr1r2riimoncur_yrrktmprTrjs r _str2timer~s RB H t   --a/     s88DD   444  ?????????CC44 C  z2 {!C {!C c((C RB c((C c((C Dyy ,,Q/ SL &[1_ G q66B;;1uu28bbCx" S#r3R011A} :B XXZZ&r** >4 J Hs5/A BA.-B. A=8B<A==BBzV^[SMTWF][a-z][a-z], (\d\d) ([JFMASOND][a-z][a-z]) (\d\d\d\d) (\d\d):(\d\d):(\d\d) GMT$z+^(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)[a-z]*,?\s*a^ (\d\d?) # day (?:\s+|[-\/]) (\w+) # month (?:\s+|[-\/]) (\d+) # year (?: (?:\s+|:) # separator before clock (\d\d?):(\d\d) # hour:min (?::(\d\d))? # optional seconds )? # optional clock \s* (?: ([-+]?\d{2,4}|(?![APap][Mm]\b)[A-Za-z]+) # timezone \s* )? (?: \(\w+\) # ASCII representation of timezone in parens. \s* )?$c  t|}|r|}t|ddz}t |d|t |dt |dt |dt|df}t|S| }t d|d}dgdz\}}}}}} } t|}||\}}}}}} } ndSt|||||| | S) Nr%rr ra)STRICT_DATE_RErfgroupsrqrrrIrgfloatr3lstrip WEEKDAY_REsubLOOSE_HTTP_DATE_REr~) textrkgrxr,rPryrzr1r2ris r http2timers?: d##A HHJJ  1..2!A$iic!A$ii!A$iiQqTE!A$KK1r{{ ;;==D >>"dA & &D'+VAX"Cb"c3 !!$''A})*&S"b#sBBt S#r2sC 4 44ra^ (\d{4}) # year [-\/]? (\d\d?) # numerical month [-\/]? (\d\d?) # day (?: (?:\s+|[-:Tt]) # separator before clock (\d\d?):?(\d\d) # hour:min (?::?(\d\d(?:\.\d*)?))? # optional seconds (and fractional) )? # optional clock \s* (?: ([-+]?\d\d?:?(:?\d\d)? |Z|z) # timezone (Z is "zero meridian", i.e. GMT) \s* )?$c  |}dgdz\}}}}}}}t|}||\}}}}}}}} ndSt |||||||S)Nr)r ISO_DATE_RErfrr~) rrPrxryrzr1r2rirk_s riso2timer2s  ;;==D'+VAX"Cb"c3 4  A}-.HHJJ)Cb#sBt S#r2sC 4 44rcr |d\}}|jd||j|dzS)Nr )spanstring)matchstartends r unmatchedrSs93AJE3 <  STT 2 22rz^\s*([^=\s;,]+)z&^\s*=\s*\"([^\"\\]*(?:\\.[^\"\\]*)*)\"z^\s*=\s*([^\s;,]*)z\\(.)cb g}|D]}|}g}|rt|}|rt|}|d}t|}|r@t|}|d}t d|}nWt|}|r9t|}|d}|}nd}| ||fnx| dr6| dd}|r| |g}ntj dd|\}} |}||r| ||S)Nr%z\1,z^[=\s;]*r)HEADER_TOKEN_RErfrrhHEADER_QUOTED_VALUE_REHEADER_ESCAPE_RErHEADER_VALUE_RErstripappendr startswithresubn) header_valuesresultr orig_textpairsrknamevaluenon_junk nr_junk_charss rsplit_header_wordsr\s+ZF#'#'  &&t,,A  ||wwqzz*11$77 %$Q<>EE'..t44A%(|| !  % !% dE]++++))#.. {{}}QRR(.&--...+-'+r4*H*H'- ? @ &&--&&& Mr([\"\\])cJ g}|D]}g}|D]X\}}|rc |}tj|}t |j}|dsd|z}|S)N/)rrrurlsplit escape_pathrr)rrpartsrs r request_pathrs\@    C L ! !# & &E uz " "D ??3  Tz Krc|j}|d}|dkr?||dzd} t|n(#t$rt d|YdSwxYwt }|S)N:r r%znonnumeric port: '%s')rrrgrsrDEFAULT_HTTP_PORT)rrrrs r request_portrs +>4urc|jd}n d|jz}|j|z|jz}|j|jd|j}n|j}d|d|dS)Nrrrz)rrrrr)r#plimit namevalues r__str__zCookie.__str__0sf 9 "aadi-a a$)+ : !#'999djj9II I'0yy%%%88rcpg}dD]9}t||}||dt|:|dt|jz|dt|jz|jjdd|dS)N)rrrrrrrrrrrrrrrrzrest=%sz rfc2109=%s(r))getattrrreprr"r  __class____name__r)r#rrrs r__repr__zCookie.__repr__:s 6 6D 4&&D KK444d4 5 5 5 5 ITZ 0 00111 L4 #5#55666>222DIIdOOOODDr)Fr ) r> __module__ __qualname__r%r(r,r.r1r7r?rHrrrrs6(%(%(%(%T"""----!!! 999 E E E E Errc(eZdZ dZdZdZdZdS)rc tr NotImplementedErrorr#cookiers rset_okzCookiePolicy.set_okRs "###rc tr rDrFs r return_okzCookiePolicy.return_ok[sO!###rc dSNTrH)r#rrs rdomain_return_okzCookiePolicy.domain_return_ok_  trc dSrLrH)r#rrs rpath_return_okzCookiePolicy.path_return_okdrNrN)r>r@rArHrJrMrPrHrrrrIsU$$$$$$ rrc eZdZ dZdZdZdZeezZdddddddddedddf d Zd Z d Z d Z d Z dZ dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdS) rr%rrr NTF)httpswssc ||_||_||_||_||_||_| |_| |_| |_| |_ | |_ |t||_ nd|_ |t|}||_ dS)NrH)netscaperfc2965rfc2109_as_netscape hide_cookie2 strict_domainstrict_rfc2965_unverifiablestrict_ns_unverifiablestrict_ns_domainstrict_ns_set_initial_dollarstrict_ns_set_pathsecure_protocolstuple_blocked_domains_allowed_domains)r#blocked_domainsallowed_domainsrUrVrWrXrYrZr[r\r]r^r_s rr%zDefaultCookiePolicy.__init__ts P   #6 (*+F(&<# 0,H)"4 0  &$)/$:$:D ! !$&D !  &#O44O /rc |jSr )rar#s rrcz#DefaultCookiePolicy.blocked_domainssB$$rc0 t||_dSr )r`ra)r#rcs rset_blocked_domainsz'DefaultCookiePolicy.set_blocked_domainss2 %o 6 6rc@|jD]}t||rdSdSr)rar)r#rblocked_domains r is_blockedzDefaultCookiePolicy.is_blockeds7"3  N 88 tt urc |jSr )rbrfs rrdz#DefaultCookiePolicy.allowed_domainssK$$rc8 |t|}||_dSr )r`rb)r#rds rset_allowed_domainsz'DefaultCookiePolicy.set_allowed_domainss&;  &#O44O /rcR|jdS|jD]}t||rdSdSr)rbr)r#rallowed_domains ris_not_allowedz"DefaultCookiePolicy.is_not_allowedsE  (5"3  N 88 uu trc td|j|jdD]&}d|z}t||}|||sdS'dS)N - checking cookie %s=%s)r verifiabilityrrrrset_ok_FTrrrr;r#rGrnfn_namefns rrHzDefaultCookiePolicy.set_oksq )6; EEEN  AkGw''B2fg&& uu trc|jtd|j|jdS|jdkr|jstddS|jdkr|jstddSdS)Nz0 Set-Cookie2 without version attribute (%s=%s)Fr $ RFC 2965 cookies are switched off$ Netscape cookies are switched offT)rrrrrVrUrFs rset_ok_versionz"DefaultCookiePolicy.set_ok_versions > ! E;  . . .5 >A  dl  9 : : :5 ^q  9 : : :5trc|jrUt|rF|jdkr|jrt ddS|jdkr|jrt ddSdSNr z> third-party RFC 2965 cookie during unverifiable transactionFz> third-party Netscape cookie during unverifiable transactionT unverifiablerrrZrr[rFs rset_ok_verifiabilityz(DefaultCookiePolicy.set_ok_verifiabilitys   N7$;$; ~!!d&F!8999u1$$)D$8999utrc|jdkr8|jr1|jdrt d|jdSdS)Nr $z' illegal name (starts with '$'): '%s'FT)rr]rrrrFs r set_ok_namezDefaultCookiePolicy.set_ok_namesN Na  D$E  K " "3 ' ' td||jdSdS)N80rz bad port %s (not numeric)Fz$ request port (%s) not found in %sT)rrstrrrrgrsrr#rGrreq_portr4s r set_ok_portzDefaultCookiePolicy.set_ok_port3s   #G,,Hx==[&&s++  !FFFF!!!!91=== 555!==E!=...utsAA76A7c td|j|jdD]&}d|z}t||}|||sdS'dS)Nrs)rrtrrrr return_ok_FTrvrws rrJzDefaultCookiePolicy.return_okHsl  )6; EEER  A"1nGw''B2fg&& uu trc|jdkr|jstddS|jdkr|jstddSdS)Nr r|Fr}T)rrVrrUrFs rreturn_ok_versionz%DefaultCookiePolicy.return_ok_versionZsW >A  dl  9 : : :5 ^q  9 : : :5trc|jrUt|rF|jdkr|jrt ddS|jdkr|jrt ddSdSrrrFs rreturn_ok_verifiabilityz+DefaultCookiePolicy.return_ok_verifiabilitycs   N7$;$; ~!!d&F!%&&&u1$$)D$%&&&utrcR|jr|j|jvrtddSdS)Nz( secure cookie with non-secure requestFT)rtyper_rrFs rreturn_ok_securez$DefaultCookiePolicy.return_ok_secureos4 = W\1FFF = > > >5trc\||jrtddSdS)Nz cookie expiredFT)r1_nowrrFs rreturn_ok_expiresz%DefaultCookiePolicy.return_ok_expiresus3   TY ' '  & ' ' '5trc|jrPt|}|d}|jdD] }||krn td||jdSdS)Nrrz0 request port %s does not match cookie port %sFT)rrrrrs rreturn_ok_portz"DefaultCookiePolicy.return_ok_port{s~ ; #G,,H[&&s++  ==E!I...utrct|\}}|j}|r|dsd|z}n|}|jdkr-|j|jzr|js||krtddS|jdkr#t||std||dS|jdkr+d|z |std||dSdS)Nrr zQ cookie with unspecified domain does not string-compare equal to request domainFzQ effective request-host name %s does not domain-match RFC 2965 cookie domain %sz; request-host %s does not match Netscape cookie domain %sT) rrrrr\DomainStrictNonDomainrrrr)r#rGrrrr dotdomains rreturn_ok_domainz$DefaultCookiePolicy.return_ok_domains )'22$  &++C00 f III Na    "T%? ? ' ,2dNN - . . .5 >A  l4&@&@  /04f > > >5 >Q  D':':9'E'E  !6 + + +5trct|\}}|dsd|z}|dsd|z}|r|dsd|z}n|}||s||sdS||rt d|dS||rt d|dSdS)NrFrrT)rrrrkrrq)r#rrrrrs rrMz$DefaultCookiePolicy.domain_return_oks *'22$""3'' $8|Hs## t8D  &++C00 f III!!),,  i0H0H 5 ??6 " "  7 @ @ @5   v & &  ;V D D D5trctd|t|}t|}||krdS||r(|ds|||dzdkrdStd||dS)Nz- checking cookie path=%sTrr%z %s does not path-match %sF)rrrrr)r#rrrpathlens rrPz"DefaultCookiePolicy.path_return_oks*D111((d)) t  4!!$'' }}S!! %-ggai.?%@C%G%G4,h===ur)r>r@rArrr DomainLiberal DomainStrictr%rcrhrkrdrnrqrHr~rrrrrrJrrrrrrrMrPrHrrrrjsLM%&;;L"&t%)#$-1(-"/.3$)"2!0!0!0!0F%%%777 %%%000 &         :::x*$       64     rrc#K t|D]:}d} |jd}t|Ed{Vn#t$rYnwxYw|s|V;dSr)listvaluesitems deepvaluesAttributeError)mappingobjs rrrs3GNN$$%%   ' IIG!# & & & & & & & &     D   III  sA  AAceZdZdS)AbsentNr>r@rArHrrrrrrc^eZdZ ejdZejdZejdZejdZejdZ ejdej Z ddZ d Z d Zd Zd Zd ZdZdZdZdZdZdZdZdZddZdZdZdZdZdZdZ dS)rz\Wrz\.?[^.]*z[^.]*z^\.+z^\#LWP-Cookies-(\d+\.\d+)Ncr|t}||_tj|_i|_dSr )r_policy _threadingRLock _cookies_lock_cookiesr#policys rr%zCookieJar.__init__s5 >(**F '-// rc||_dSr )rrs r set_policyzCookieJar.set_policys  rcg}|j||sgStd||j|}|D]}|j||s||}|D]Q}|j||std-td||R|S)Nz!Checking %s for cookies to returnz not returning cookiez it's a match) rrMrrkeysrPrrJr)r#rrcookiescookies_by_pathrcookies_by_namerGs r_cookies_for_domainzCookieJar._cookies_for_domains|,,VW== I2F;;;-/#((** ' 'D<..tW== -d3O)0022 ' '|--fg>>4555()))v&&&&  ' rc g}|jD]+}||||,|Sr )rrextendr)r#rrrs r_cookies_for_requestzCookieJar._cookies_for_request sS@m((** F FF NN433FGDD E E E Erc@ |ddd}g}|D]|}|j}|s d}|dkr|d|z|jF|j|jr'|dkr!|jd|j}n|j}|j||jn||jd||dkr|j r|d |j z|j d rE|j }|j s| d r |d d}|d |z|j+d }|jr |d|jzz}||~|S)Nc*t|jSr )rr)as rz)CookieJar._cookie_attrs..s3qv;;rT)rreverseFr z $Version=%srrz $Path="%s"rr%z $Domain="%s"z$Portz="%s")sortrrr non_word_rerfquote_rerrrrrrrrr) r#rrattrsrGrrrr4s r _cookie_attrszCookieJar._cookie_attrss   .. === ( $( $FnG :" Q;;LL!8999 ) '' 55*:AA++ ))'6<@@ |# V[))))  UU;<<<{{(=LL !;<<<=++C00:#]F"5,))#..,!'LL&!8999;*A,86;!67LLOOO rc td|j tt jx|j_|_||}||}|r>| ds)| dd ||jj rI|jj s=| ds(|D]%}|jdkr| ddn&|jn#|jwxYw|dS)Nadd_cookie_headerrrCookie2r%z $Version="1")rracquirergrtrrrr has_headeradd_unredirected_headerrrVrXrreleaseclear_expired_cookies)r#rrrrGs rrzCookieJar.add_cookie_headerLsx "### ""$$$ ),/ ,<,<
RRR+   & & ( ( ( (D  & & ( ( ( ( ""$$$$$s C0D55Ecx g}d}d}|D].}|d\}}d}d} i} i} |ddD]\} } | }||vs||vr|} | |vr| d} | | vr0| dkr)| tdd} n| } | d kr|rh| td z| d krAd} t| } n"#t$rtd d} Yn@wxYwd } |j| z} | |vs| |vr"| | d vrtd| zd} n | | | <| | | <| r|||| | f0|S)N)rr)rrrrrrr commenturlr Fr%Trz% missing value for domain attributerzM missing or invalid value for expires attribute: treating as session cookierz? missing or invalid (non-numeric) value for max-age attribute)rrrz! missing value for %s attribute)rIrrgrsrr)r# attrs_set cookie_tuples boolean_attrs value_attrs cookie_attrsrr max_age_set bad_cookiestandardr$rrrs r_normalized_cookie_tuplesz#CookieJar._normalized_cookie_tuplesms  + 0 &H @H @L&q/KD% KJHD$QRR(2 2 1WWYY$$m(;(;A %%!)A====yFGGG%)  A >>"! y FGGG  >>"&KFF% 2333%)  "A A A$$!}*<*< !BBBBQFGGG%) "#HQKKDGG   $x!> ? ? ? ?s-B==CCc2|\}}}}|dt}|dt}|dt} |dt} |dd} | " t| } n#t$rYdSwxYw|dd} |dd} |d d}|d d}|tur|d krd }t |}n_d}t |}|d }|dkr| dkr |d|}n |d|dz}t|dkrd }|tu}d}|r"t| d}|turt|\}}|}n| dsd|z}d}| tur+| t|} nd }tj dd | } nd} | turd} d } nH| |jkr= ||||n#t $rYnwxYwt#d|||dSt%| ||| ||||||| | | |||S)NrrrrrrFrrrrTrrr r%rz\s+z2Expiring cookie, domain='%s', path='%s', name='%s')r*rrgrsrrrrboolrrrrrrclearKeyErrorrr)r#tuprrrrr$rrrrrrrrrrrrrrrrs r_cookie_from_cookie_tuplez#CookieJar._cookie_from_cookie_tuples '*#eXth//||FF++||FF++,,y&11,,y$//   g,,   tt h..,,y%00,,y$//ll<66  v  $"**!Nt$$DD"N((D 3ABwwa<<8DD1:D4yyA~~ct"/"  >!%f&7&7&<&.no_matching_rfc2965ls #*ININJCf,,r)rget_allrgrtrrrVrUr r Exceptionr"rrrrrfilterr) r#responserr rfc2965_hdrsns_hdrsrVrUr ns_cookiesrrGrs r make_cookieszCookieJar.make_cookies?sO--//}b99 //,33(+DIKK(8(88 DI,&<( g  !(  &.  #* I 22"<00';;GG    % ' ' 'GGG   +x + !99$W--w88    )+++    ) )* 5 5 5 E%MMFHLFFM6; DEE:@----$$7DD  +z***s$#CCC'#D D('D(cl |j ttjx|j_|_|j||r|||jdS#|jwxYwr ) rrrgrtrrrH set_cookierrFs rset_cookie_if_okzCookieJar.set_cookie_if_okvs; ""$$$ ),/ ,<,<
> , ,<&&vw77,0&999OOF+++ ,   & & ( ( ( ( (D  & & ( ( ( (s AB33Cc |)||td|j|||=dS|!|td|j||=dS| |j|=dSi|_dS)Nz8domain and path must be given to remove a cookie by namez.domain must be given to remove cookies by path)rsr)r#rrrs rrzCookieJar.clears   DL NPPP f%d+D111  ~ DFFF f%d+++   f%%%DMMMrc |j |D]/}|jr&||j|j|j0 |jdS#|jwxYwr )rrrrrrrr)r#rGs rclear_session_cookieszCookieJar.clear_session_cookiess ""$$$ ) H H>HJJv}fk6;GGG H   & & ( ( ( ( (D  & & ( ( ( (s 2A**BcR |j tj}|D]=}||r&||j|j|j> |jdS#|jwxYwr ) rrrtr1rrrrr)r#r0rGs rrzCookieJar.clear_expired_cookiess  ""$$$ ))++C H H$$S))HJJv}fk6;GGG H   & & ( ( ( ( (D  & & ( ( ( (s AB B&c*t|jSr )rrrfs r__iter__zCookieJar.__iter__s$-(((rc d}|D]}|dz}|S)Nr r%rH)r#rrGs r__len__zCookieJar.__len__s$1 %%FAAArcg}|D]$}|t|%d|jjdd|dSN<[rz]>)rr<r=r>rr#rrGs rr?zCookieJar.__repr__sS 22FAHHT&\\22222!^444diillllCCrcg}|D]$}|t|%d|jjdd|dSr/)rrr=r>rr2s rr7zCookieJar.__str__sS 11FAHHS[[11111!^444diillllCCrr )NNN)!r>r@rArcompilerrstrict_domain_re domain_redots_reASCIImagic_rer%rrrrrrr r rrrrr%rr(rr+r-r?r7rHrrrrs "*U##Krz+&&H!rz+.. 8$$Ibj!!Grz6AAH$999v%%%B___BZZZx ' ' '555n ) ) ) ) ) ) ) ) )6 ) ) ))))&))) DDD DDDDDrrceZdZdS)rNrrHrrrrrrrc4eZdZ ddZddZddZ ddZdS) rNFc t|||tj|}||_t ||_dSr )rr%osfspathfilenamer delayload)r#r@rArs rr%zFileCookieJar.__init__sL 4(((  y**H  irc tr rD)r#r@ignore_discardignore_expiress rsavezFileCookieJar.saves%!###rc |#|j|j}nttt|5}|||||ddddS#1swxYwYdSr )r@rsMISSING_FILENAME_TEXTopen _really_loadr#r@rCrDr s rloadzFileCookieJar.loads'  }(T](("#8999 (^^ Kq   a>> J J J K K K K K K K K K K K K K K K K K KsAA #A c |#|j|j}ntt|j t j|j}i|_ ||||n#t$r ||_wxYw |j dS#|j wxYwr ) r@rsrGrrr!deepcopyrrKOSErrorr)r#r@rCrD old_states rrevertzFileCookieJar.revert s  }(T](("#8999 ""$$$ ) dm44IDM  (NNCCCC    )  D   & & ( ( ( ( (D  & & ( ( ( (s$ B,"A:9B,:B  B,,C)NFNNFF)r>r@rAr%rErKrPrHrrrrss@ ) ) ) )$$$$KKKK#49))))))rrc |j|jfd|jfd|jfg}|j|d|jf|jr|d|jr|d|jr|d|j r|d|j r6|dtt|j f|j r|d |jr|d |jf|jr|d |jft!|j}|D]1}||t'|j|f2|d t'|jft+|gS) Nrrr) path_specN) port_specN) domain_dotN)rNr)rNrrr)rrrrrrrrrrrrVrrrrsortedr"rrrr)rGrrrs rlwp_cookie_strrW's +v| $ &+  FM " $A{&&+)> ? ? ? ;ahh':;;; ;ahh':;;;  @!((+?"@"@"@ }0ahh/000 ~Bqxx(v~)>)>??!ABBB ~2qxx 1222 ~fdopenrHO_CREATO_WRONLYO_TRUNCwriter[rJs rrEzLWPCookieJar.save`s   }(T](("#8999 Y GHbj2;6CU K K    E GG( ) ) ) GGDOONNCC D D D E E E E E E E E E E E E E E E E E Es3?B??CCc|}|j|sd|z}t|t j}d}d} d} |} | dkrdS| |s3| t |d} t| gD]f} | d\} }i}i}| D]}d||<| ddD]E\}}|| }nd}|| vs|| vr|}|| vr |d }|||<6|| vr|||<@|||<F|j }|d }|d }|t|}|d }|d }|d }t|d| ||d|d|||d|d|d|d|||d|d|}|s |j r8|s||rQ||h#t $rt"$r$t%td|d| wxYw)Nz5%r does not look like a Set-Cookie3 (LWP) format filez Set-Cookie3:)rTrSrUrr)rrrrrrrr%rr FTrrrrrrrTrUrrSrrrz invalid Set-Cookie3 format file : )readliner:rfrrtrrrrrIr*rrrr1rrNrr")r#r r@rCrDmagicr!r0headerrrlinedatarrrr$rrrrrrrrr!s rrIzLWPCookieJar._really_loados% }##E** !$%CC.. ikk. 0 ; .4 'zz||2::uuv..CKKLL)//11.v66-'-'D"&q'KD%!HD*,,&+ $QRR((1=!"BB!%B+--23F3F "A -- yd!*+HQKK+--*+HQKK&'DGG Aa llGa llG*"*7"3"3"&Qx[[F'-'8'8'='=$qq||T5 qyy!!K..%'7< qyy!!K.. q{{&& q|| q# % %A*!ai! )!all3.?.?! OOA&&&&i4 'j     . . . % ' ' ')%XXtt-.. . .sH3:F9H338I+)TTrQ)r>r@rAr[rErIrHrrrrCsY !!!! E E E EL.L.L.L.L.rrceZdZ dZddZdS)r ctj}t|st d|z |}i}|dkrdS|t r&d|t<|tt d}| dr |dd}| ds| dkr| d\}} } } } } }| dk} | dk} | dkr|} d}|d }d }| dkrd} d }td | |dd || || d | | |dd|}|s |j r;|s||rT||j#t $rt"$r$t%t d |d|wxYw)Nz4%r does not look like a Netscape format cookies filer%rrZr)#r TRUErFTr z%invalid Netscape format cookies file re)rtNETSCAPE_MAGIC_RGXrrfrrHTTPONLY_PREFIX HTTPONLY_ATTRrrrrrrr1rrNrr")r#r r@rCrDr0rir$rrrrrrrrrr!s rrIzMozillaCookieJar._really_loadsfikk!'' 55 F ? .7 #zz||2::uu ???337*,D'O 4 4 5 56D==&&8tCRCyJJLL++J77JJLLB&& 4((M($u F*$4$> 2::!D E$//44  b=="G"G1dE!#3[!"" ! !&!)%!,,s*;*;"""o7 #r     . . . % ' ' ')%XXtt-.. . .sF>2E F>>8G6NFc P|#|j|j}ntttjtj|tjtjztjzdd5}| ttj }|D]}|j }|s|j r|s||r+|jrd}nd}|drd} nd} |jt%|j} nd} |j d} |j} n|j} |j} |t,r t.|z}| d|| |j|| | | gdz ddddS#1swxYwYdS) Nr]r^roFALSErrrnrZ)r@rsrGr>r_rHr`rarbrcNETSCAPE_HEADER_TEXTrtrrr1rrrrrrr(rrrqrr) r#r@rCrDr r0rGrrrrrrs rrEzMozillaCookieJar.save's  }(T](("#8999 Y GHbj2;6CU K K   "  GG( ) ) ))++C  %&.%&*;*;C*@*@='6&&&f$$S)),;;$+k>-!&.11GG G<'D"KEE!;D"LE..}==6,v5FIIv{FK%we=>>3  " " " " " " " " " " " " " " " " " " s3DFF"FrQ)r>r@rArIrErHrrr r s@>G.G.G.R''''''rr r )W__all__r>r!rMrrt urllib.parserurllib.request threadingr http.clienthttpcalendarr r rrrrrqrclient HTTP_PORTrr5rprGrur"r+r3rXrZrqrVr[rdr9rerlr~rIrXrrrrrrrrrrrrrrrrrrrrrrrrr r rrrrrrrrrrrNrrrWrr rHrrrs6 M M M  ########   C -..RZ @AA:AAA 988 4 4 4226222 BBBB&0000(T = = bj5rx@@    6 6 6 p,-/X77RZ2BD28OEE RZ & D28O)*656565pbj 4") # $555B333 $$677#$MNN#$9::2:h''SSSj# ;//2AAAH "*Y ) )   %%%N(bj28,,        $"*9::+++   ! ! ! F"_E_E_E_E_E_E_E_EDB_____,___B   "LDLDLDLDLDLDLDLD`4)4)4)4)4)I4)4)4)n"""8x.x.x.x.x.=x.x.x.vPPPPP}PPPPPrPK3])-~X~Xcookies.cpython-311.opt-1.pycnu[ !A?hMdZddlZddlZddlZgdZdjZdjZdjZGdde Z ej ej zd zZ e d zZd eed eeeez DZeed deddiejdeje zjZdZejdjZdZdZgdZgdZdeefdZ Gdde!Z"dZ#e#dzZ$ejde#zdze$zdzej%ej&zZ'Gd d!e!Z(Gd"d#e(Z)dS)$a. Here's a sample session to show how to use this module. At the moment, this is the only documentation. The Basics ---------- Importing is easy... >>> from http import cookies Most of the time you start by creating a cookie. >>> C = cookies.SimpleCookie() Once you've created your Cookie, you can add values just as if it were a dictionary. >>> C = cookies.SimpleCookie() >>> C["fig"] = "newton" >>> C["sugar"] = "wafer" >>> C.output() 'Set-Cookie: fig=newton\r\nSet-Cookie: sugar=wafer' Notice that the printable representation of a Cookie is the appropriate format for a Set-Cookie: header. This is the default behavior. You can change the header and printed attributes by using the .output() function >>> C = cookies.SimpleCookie() >>> C["rocky"] = "road" >>> C["rocky"]["path"] = "/cookie" >>> print(C.output(header="Cookie:")) Cookie: rocky=road; Path=/cookie >>> print(C.output(attrs=[], header="Cookie:")) Cookie: rocky=road The load() method of a Cookie extracts cookies from a string. In a CGI script, you would use this method to extract the cookies from the HTTP_COOKIE environment variable. >>> C = cookies.SimpleCookie() >>> C.load("chips=ahoy; vienna=finger") >>> C.output() 'Set-Cookie: chips=ahoy\r\nSet-Cookie: vienna=finger' The load() method is darn-tootin smart about identifying cookies within a string. Escaped quotation marks, nested semicolons, and other such trickeries do not confuse it. >>> C = cookies.SimpleCookie() >>> C.load('keebler="E=everybody; L=\\"Loves\\"; fudge=\\012;";') >>> print(C) Set-Cookie: keebler="E=everybody; L=\"Loves\"; fudge=\012;" Each element of the Cookie also supports all of the RFC 2109 Cookie attributes. Here's an example which sets the Path attribute. >>> C = cookies.SimpleCookie() >>> C["oreo"] = "doublestuff" >>> C["oreo"]["path"] = "/" >>> print(C) Set-Cookie: oreo=doublestuff; Path=/ Each dictionary element has a 'value' attribute, which gives you back the value associated with the key. >>> C = cookies.SimpleCookie() >>> C["twix"] = "none for you" >>> C["twix"].value 'none for you' The SimpleCookie expects that all values should be standard strings. Just to be sure, SimpleCookie invokes the str() builtin to convert the value to a string, when the values are set dictionary-style. >>> C = cookies.SimpleCookie() >>> C["number"] = 7 >>> C["string"] = "seven" >>> C["number"].value '7' >>> C["string"].value 'seven' >>> C.output() 'Set-Cookie: number=7\r\nSet-Cookie: string=seven' Finis. N) CookieError BaseCookie SimpleCookiez;  ceZdZdS)rN)__name__ __module__ __qualname__9/opt/alt/python-internal/lib64/python3.11/http/cookies.pyrrsDr rz!#$%&'*+-.^_`|~:z ()/<=>?@[]{}ci|]}|d|z S)z\%03or ).0ns r rs4JJJ(Q,JJJr "\"\z\\z[%s]+ch|t|r|Sd|tzdzS)zQuote a string for use in a cookie header. If the string does not need to be double-quoted, then just return the string. Otherwise, surround the string in doublequotes and quote (with a \) special characters. Nr) _is_legal_key translate _Translatorstrs r_quoters6 {mC(({ S]];///#55r z\\(?:([0-3][0-7][0-7])|(.))ch|dr#tt|ddS|dS)N)chrint)ms r_unquote_replacer%s1t3qtQ<<   t r c|t|dkr|S|ddks |ddkr|S|dd}tt|S)Nr!rrr)len _unquote_subr%rs r_unquoter*s\ {c#hhll  1v}}B3 ad)C (# . ..r )MonTueWedThuFriSatSun) NJanFebMarAprMayJunJulAugSepOctNovDecc ddlm}m}|}|||z\ }}}} } } } } }d|| ||||| | | fzS)Nr)gmtimetimez#%s, %02d %3s %4d %02d:%02d:%02d GMT)r@r?)future weekdayname monthnamer?r@nowyearmonthdayhhmmsswdyzs r_getdaterNsu!!!!!!!! $&&C-3VC&L-A-A*D%b"b"a 0 OS)E"2D"b" E FFr c eZdZdZdddddddd d d Zd d hZdZedZedZ edZ dZ d!dZ dZ ejZdZdZdZdZdZdZd"dZeZdZd!dZd!d ZeejZdS)#MorselaCA class to hold ONE (key, value) pair. In a cookie, each such pair may have several attributes, so this class is used to keep the attributes associated with the appropriate key,value pair. This class also includes a coded_value attribute, which is used to hold the network representation of the value. expiresPathCommentDomainzMax-AgeSecureHttpOnlyVersionSameSite) rQpathcommentdomainmax-agesecurehttponlyversionsamesiter]r^c|dx|_x|_|_|jD]}t||ddS)Nr)_key_value _coded_value _reserveddict __setitem__)selfkeys r__init__zMorsel.__init__sP6:: :DK$"3> , ,C   T3 + + + + , ,r c|jSN)rbrhs rriz Morsel.keys yr c|jSrl)rcrms rvaluez Morsel.values {r c|jSrl)rdrms r coded_valuezMorsel.coded_values   r c|}||jvrtd|t|||dSNzInvalid attribute )lowerrerrfrg)rhKVs rrgzMorsel.__setitem__#sO GGIIDN""+;<< < q!$$$$$r Nc|}||jvrtd|t|||Srs)rtrerrf setdefault)rhrivals rrxzMorsel.setdefault)sGiikk dn $ $+=>> >tS#...r ct|tstSt||o/|j|jko|j|jko|j|jkSrl) isinstancerPNotImplementedrf__eq__rcrbrdrhmorsels rr}z Morsel.__eq__/sg&&)) "! ! D&))9 v},9 V[(9!V%88 :r ct}t|||j|j|Srl)rPrfupdate__dict__r~s rcopyz Morsel.copy9s< FD!!!t}--- r ci}t|D]9\}}|}||jvrt d||||<:t||dSrs)rfitemsrtrerr)rhvaluesdatarirys rrz Morsel.update?sV **,,  HC))++C$.((!kCC"ABBBDII D$r c8||jvSrl)rtre)rhrus r isReservedKeyzMorsel.isReservedKeyHswwyyDN**r c||jvrtd|t|std|||_||_||_dS)NzAttempt to set a reserved key z Illegal key )rtrerrrbrcrd)rhriry coded_vals rsetz Morsel.setKso 99;;$. ( (+CCIJJ JS!! 9+##788 8  %r c,|j|j|jdS)N)rirorqrbrcrdrms r __getstate__zMorsel.__getstate__Vs!9[,   r cT|d|_|d|_|d|_dS)Nrirorqr)rhstates r __setstate__zMorsel.__setstate__]s+%L Gn !-0r Set-Cookie:c6|d||S)Nr) OutputString)rhattrsheaders routputz Morsel.outputbs" &&$"3"3E":":":;;r cLd|jjd|dS)N<: >) __class__r rrms r__repr__zMorsel.__repr__gs,!^444d6G6G6I6I6I6IJJr cZd||ddzS)Nz rr)rreplace)rhrs r js_outputzMorsel.js_outputjs4   ''//U;; = =r cg}|j}||jd|j||j}t |}|D]\}}|dkr ||vr|dkr>t |tr)||j|dt|V|dkr1t |tr|d|j||fz|dkr>t |tr)||j|dt|||j vr'|r#|t|j|||j|d|t|S)N=rrQr\z%s=%drZ) appendrirqresortedrr{r#rNrr_flags_semispacejoin)rhrresultrrriros rrzMorsel.OutputStringts $(((D$4$45666 =NEtzz||$$ ? ?JC{{%iJuc$:$:$."5"5"5xGHHHH !!j&<&<!w$."5u!==>>>> !!j&<&<!$."5"5"5ve}}}EFFFF ##5F3t~c233444$."5"5"5uu=>>>>f%%%r rl)Nr)r r r __doc__rerrjpropertyrirorqrgrxr}object__ne__rrrrrrr__str__rrr classmethodtypes GenericAlias__class_getitem__r r rrPrPs*  I #F,,,XX!!X!%%% //// :::]F    +++ & & &   111 <<<<GKKK====&&&&B$ E$677r rPz,\w\d!#%&'~_`><@,:/\$\*\+\-\.\^\|\)\(\?\}\{\=z\[\]z \s* # Optional whitespace at start of cookie (?P # Start of group 'key' [a ]+? # Any word of at least one letter ) # End of group 'key' ( # Optional group: there may not be a value. \s*=\s* # Equal Sign (?P # Start of group 'val' "(?:[^\\"]|\\.)*" # Any doublequoted string | # or \w{3},\s[\w\d\s-]{9,11}\s[\d:]{8}\sGMT # Special case for "expires" attr | # or [a-]* # Any word or empty string ) # End of group 'val' )? # End of optional value group \s* # Any number of spaces. (\s+|;|$) # Ending either at space, semicolon, or EOS. c\eZdZdZdZdZddZdZdZdd Z e Z d Z dd Z d Z efdZdS)rz'A container class for a set of Morsels.c ||fS)a real_value, coded_value = value_decode(STRING) Called prior to setting a cookie's value from the network representation. The VALUE is the value read from HTTP header. Override this function to modify the behavior of cookies. r rhrys r value_decodezBaseCookie.value_decodes Cxr c(t|}||fS)zreal_value, coded_value = value_encode(VALUE) Called prior to setting a cookie's value from the dictionary representation. The VALUE is the value being assigned. Override this function to modify the behavior of cookies. rrhrystrvals r value_encodezBaseCookie.value_encodes Sv~r Nc8|r||dSdSrl)load)rhinputs rrjzBaseCookie.__init__s,   IIe       r c||t}||||t|||dS)z+Private method for setting a cookie's valueN)getrPrrfrg)rhri real_valuerqMs r__setzBaseCookie.__setsM HHS&(( # # c:{+++ sA&&&&&r ct|trt|||dS||\}}||||dS)zDictionary style assignment.N)r{rPrfrgr_BaseCookie__set)rhrirorvalcvals rrgzBaseCookie.__setitem__se eV $ $ (   T3 . . . . .**511JD$ JJsD$ ' ' ' ' 'r r cg}t|}|D].\}}||||/||S)z"Return a string suitable for HTTP.)rrrrjoin)rhrrseprrriros rrzBaseCookie.outputsdtzz||$$ 7 7JC MM%,,uf55 6 6 6 6xxr cg}t|}|D]1\}}||dt|j2d|jjdt|dS)Nrrrr)rrrreprrorr _spacejoin)rhlrriros rrzBaseCookie.__repr__s tzz||$$ 9 9JC HHT%+%6%6%67 8 8 8 8 9!^444jmmmmDDr cg}t|}|D]-\}}|||.t |S)z(Return a string suitable for JavaScript.)rrrr _nulljoin)rhrrrriros rrzBaseCookie.js_outputs^tzz||$$ 2 2JC MM%//%00 1 1 1 1   r ct|tr||n|D] \}}|||< dS)zLoad cookies from a string (presumably HTTP_COOKIE) or from a dictionary. Loading cookies from a dictionary 'd' is equivalent to calling: map(Cookie.__setitem__, d.keys(), d.values()) N)r{r_BaseCookie__parse_stringr)rhrawdatariros rrzBaseCookie.loadsZ gs # # "    ( ( ( (&mmoo " " U!S r cvd}t|}g}d}d}d}d|cxkr|krVnnR|||} | sn8| d| d} } | d}| ddkr$|sz||| dd| fn| t jvrg|sdS| ;| t jvr||| dfnZdS||| t| fn2| .||| | | fd}ndSd|cxkr|kPnd} |D]6\} } } | |kr| | | <| \}}| | |||| } 7dS) NrFrr!riry$T) r(matchgroupendrrtrPrerr*rr)rhrpattir parsed_items morsel_seenTYPE_ATTRIBUTE TYPE_KEYVALUErrirortprrs r__parse_stringzBaseCookie.__parse_string s  HH   1jjjjqjjjjjJJsA&&E U++U[[-?-?C ! A1v}}"##^SWe$DEEEE 000"F=yy{{fm33$++^S$,GHHHH ''huoo(NOOOO"##]C9J9J59Q9Q$RSSS" E1jjjjqjjjjJ *  NBU^#### d 3d+++I  r rl)Nrr)r r r rrrrjrrgrrrrr_CookiePatternrr r rrrs11''' (((    GEEE!!!!   (6::::::r rceZdZdZdZdZdS)rz SimpleCookie supports strings as cookie values. When setting the value using the dictionary assignment notation, SimpleCookie calls the builtin str() to convert the value to a string. Values received from HTTP are kept as strings. c$t||fSrl)r*rs rrzSimpleCookie.value_decodeMs}}c!!r cBt|}|t|fSrl)rrrs rrzSimpleCookie.value_encodePsSvf~~%%r N)r r r rrrr r rrrFs< """&&&&&r r)*rrestringr__all__rrrr Exceptionr ascii_lettersdigits _LegalChars_UnescapedCharsrrangemapordrrcompileescape fullmatchrrsubr)r%r* _weekdayname _monthnamerNrfrP_LegalKeyChars_LegalValueCharsASCIIVERBOSErrrr r rrsNXXz 7 7 7 G  X      )   ""V]25GG /JJEE#JJ##cc#.G.G*H*HHJJJ CHHeCIIv  7YRY{%;%;;<<F  6 6 6rz899=  ///6A@@ 888 <:FFFFi8i8i8i8i8Ti8i8i8jB!G+        " BJ #  .IIIIIIIIX & & & & &: & & & & &r PK3]rserver.cpython-311.pycnu[ !A?h_zdZdZgdZddlZddlZddlZddlZddlZ ddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddl mZdZdZGdd ejZGd d ejeZGd d ejZGddeZ dZ!da"dZ#dZ$Gdde Z%dZ&eedddfdZ'e(dkrddl)Z)ddl*Z*e)j+Z,e,-ddde,-ddd d!"e,-d#d$e j.d%&e,-d'd(d)dd*+e,-d,de/d-d./e,0Z1e1j2re%Z3ne Z3Gd0d1eZ4e'e3e4e1j5e1j6e1j72dSdS)3a@HTTP server classes. Note: BaseHTTPRequestHandler doesn't implement any HTTP request; see SimpleHTTPRequestHandler for simple implementations of GET, HEAD and POST, and CGIHTTPRequestHandler for CGI scripts. It does, however, optionally implement HTTP/1.1 persistent connections, as of version 0.3. Notes on CGIHTTPRequestHandler ------------------------------ This class implements GET and POST requests to cgi-bin scripts. If the os.fork() function is not present (e.g. on Windows), subprocess.Popen() is used as a fallback, with slightly altered semantics. In all cases, the implementation is intentionally naive -- all requests are executed synchronously. SECURITY WARNING: DON'T USE THIS CODE UNLESS YOU ARE INSIDE A FIREWALL -- it may execute arbitrary Python code or external programs. Note that status code 200 is sent prior to execution of a CGI script, so scripts cannot send other status codes such as 302 (redirect). XXX To do: - log requests even later (to capture byte count) - log user-agent header and other interesting goodies - send error log to separate file z0.6) HTTPServerThreadingHTTPServerBaseHTTPRequestHandlerSimpleHTTPRequestHandlerCGIHTTPRequestHandlerN) HTTPStatusaD Error response

Error response

Error code: %(code)d

Message: %(message)s.

Error code explanation: %(code)s - %(explain)s.

ztext/html;charset=utf-8ceZdZdZdZdS)rctj||jdd\}}t j||_||_dS)z.Override server_bind to store the server name.N) socketserver TCPServer server_bindserver_addresssocketgetfqdn server_name server_port)selfhostports 8/opt/alt/python-internal/lib64/python3.11/http/server.pyrzHTTPServer.server_bindsN**4000(!, d!>$//N)__name__ __module__ __qualname__allow_reuse_addressrrrrrs)     rrceZdZdZdS)rTN)rrrdaemon_threadsrrrrrsNNNrrc eZdZdZdejdzZdezZ e Z e Z dZdZdZdZd Zd#d Zd$d Zd$d ZdZdZdZd%dZdZedejededdDZ de e!d<dZ"dZ#d$dZ$dZ%gdZ&gdZ'd Z(d!Z)e*j+j,Z-d"e.j/0DZ1d S)&raHTTP request handler base class. The following explanation of HTTP serves to guide you through the code as well as to expose any misunderstandings I may have about HTTP (so you don't need to read the code to figure out I'm wrong :-). HTTP (HyperText Transfer Protocol) is an extensible protocol on top of a reliable stream transport (e.g. TCP/IP). The protocol recognizes three parts to a request: 1. One line identifying the request type and path 2. An optional set of RFC-822-style headers 3. An optional data part The headers and data are separated by a blank line. The first line of the request has the form where is a (case-sensitive) keyword such as GET or POST, is a string containing path information for the request, and should be the string "HTTP/1.0" or "HTTP/1.1". is encoded using the URL encoding scheme (using %xx to signify the ASCII character with hex code xx). The specification specifies that lines are separated by CRLF but for compatibility with the widest range of clients recommends servers also handle LF. Similarly, whitespace in the request line is treated sensibly (allowing multiple spaces between components and allowing trailing whitespace). Similarly, for output, lines ought to be separated by CRLF pairs but most clients grok LF characters just fine. If the first line of the request has the form (i.e. is left out) then this is assumed to be an HTTP 0.9 request; this form has no optional headers and data part and the reply consists of just the data. The reply form of the HTTP 1.x protocol again has three parts: 1. One line giving the response code 2. An optional set of RFC-822-style headers 3. The data Again, the headers and data are separated by a blank line. The response code line has the form where is the protocol version ("HTTP/1.0" or "HTTP/1.1"), is a 3-digit response code indicating success or failure of the request, and is an optional human-readable string explaining what the response code means. This server parses the request and the headers, and then calls a function specific to the request type (). Specifically, a request SPAM will be handled by a method do_SPAM(). If no such method exists the server sends an error response to the client. If it exists, it is called with no arguments: do_SPAM() Note that the request name is case sensitive (i.e. SPAM and spam are different requests). The various request details are stored in instance variables: - client_address is the client IP address in the form (host, port); - command, path and version are the broken-down request line; - headers is an instance of email.message.Message (or a derived class) containing the header information; - rfile is a file object open for reading positioned at the start of the optional input data part; - wfile is a file object open for writing. IT IS IMPORTANT TO ADHERE TO THE PROTOCOL FOR WRITING! The first thing to be written must be the response line. Then follow 0 or more header lines, then a blank line, and then the actual data (if any). The meaning of the header lines depends on the command executed by the server; in most cases, when data is returned, there should be at least one header line of the form Content-type: / where and should be registered MIME types, e.g. "text/html" or "text/plain". zPython/rz BaseHTTP/HTTP/0.9cd|_|jx|_}d|_t |jd}|d}||_|}t|dkrdSt|dkrp|d} | d st|d d d }|d }t|d krttd|Drtdtd|Drtdt|dt|d f}n;#ttf$r'|t jd|zYdSwxYw|dkr|jdkrd|_|dkr%|t jd|zdS||_d t|cxkrdks'n|t jd|zdS|dd \}}t|d kr2d|_|dkr%|t jd|zdS||c|_|_|j dr"d |jd z|_ t,j|j|j|_n#t,jj$r9}|t jdt |Yd}~dSd}~wt,jj$r9}|t jdt |Yd}~dSd}~wwxYw|jdd} | d krd|_n*| d!kr|jdkrd|_|jd"d} | d#kr,|jdkr!|jdkr|!sdSdS)$aHParse a request (internal). The request should be stored in self.raw_requestline; the results are in self.command, self.path, self.request_version and self.headers. Return True for success, False for failure; on failure, any relevant error response has already been sent back. NTz iso-8859-1 rFzHTTP//r .r c3@K|]}| VdSN)isdigit.0 components r z7BaseHTTPRequestHandler.parse_request../s1OO99,,...OOOOOOrznon digit in http versionc3<K|]}t|dkVdS) N)lenr,s rr/z7BaseHTTPRequestHandler.parse_request..1s-KKys9~~*KKKKKKrz unreasonable length http versionzBad request version (%r))r r zHTTP/1.1)r rzInvalid HTTP version (%s)zBad request syntax (%r)GETzBad HTTP/0.9 request type (%r)z//)_classz Line too longzToo many headers Connectionclose keep-aliveExpectz 100-continue)"commanddefault_request_versionrequest_versionclose_connectionstrraw_requestlinerstrip requestlinesplitr2 startswith ValueErroranyint IndexError send_errorr BAD_REQUESTprotocol_versionHTTP_VERSION_NOT_SUPPORTEDpathlstriphttpclient parse_headersrfile MessageClassheaders LineTooLongREQUEST_HEADER_FIELDS_TOO_LARGE HTTPExceptiongetlowerhandle_expect_100) rversionrAwordsbase_version_numberversion_numberr:rLerrconntypeexpects r parse_requestz$BaseHTTPRequestHandler.parse_request s )-)EEw $$. == !((00 &!!## u::??5 u::??BiG ))'22%$$&-mmC&;&;A&>#!4!:!:3!?!?~&&!++$$OOOOOOOB$%@AAAKKNKKKKKI$%GHHH!$^A%6!7!7^A=N9O9O!O +   *.8:::uu   ''D,AZ,O,O(-%''9/2EEGGGu#*D CJJ####!#### OO&)K7 9 9 95bqb  u::??$(D !%*4w>@@@u")4 di 9   % % 4di..s333DI ;44TZ<@>  w & &$(D ! !nn,..#z11$)D !!!(B// LLNNn , ,%33$ 22))++ uts7C!E664F.-F.0L N#.MN#*.NN#cl|tj|dS)a7Decide what to do with an "Expect: 100-continue" header. If the client is expecting a 100 Continue response, we must respond with either a 100 Continue or a final response before waiting for the request body. The default is to always respond with a 100 Continue. You can behave differently (for example, reject unauthorized requests) by overriding this method. This method should either return True (possibly after sending a 100 Continue response) or send an error response and return False. T)send_response_onlyrCONTINUE end_headersrs rrYz(BaseHTTPRequestHandler.handle_expect_100ys2  3444 trc |jd|_t|jdkr6d|_d|_d|_|tj dS|js d|_ dS| sdSd|jz}t||s*|tj d|jzdSt||}||jdS#t"$r(}|d|d|_ Yd}~dSd}~wwxYw) zHandle a single HTTP request. You normally don't need to override this method; see the class __doc__ string for information on how to handle specific HTTP commands such as GET and POST. iir6NTdo_zUnsupported method (%r)zRequest timed out: %r)rQreadliner?r2rAr<r:rHrREQUEST_URI_TOO_LONGr=rahasattrNOT_IMPLEMENTEDgetattrwfileflush TimeoutError log_error)rmnamemethodes rhandle_one_requestz)BaseHTTPRequestHandler.handle_one_requests_ #':#6#6u#=#=D 4'((500#% ')$!  ?@@@' (,%%%'' DL(E4'' .- <>>>T5))F FHHH J           NN2A 6 6 6$(D ! FFFFF  s1A+D/D?DAD3D ED;;Ecd|_||js||jdSdS)z&Handle multiple requests if necessary.TN)r=rurfs rhandlezBaseHTTPRequestHandler.handlesZ $ !!!' &  # # % % %' & & & & &rNc |j|\}}n#t$rd\}}YnwxYw||}||}|d||||||ddd}|dkr|t jt jt jfvr|j |tj |dtj |dd z}| d d }|d |j |d tt|||jdkr|r|j|dSdSdS)akSend and log an error reply. Arguments are * code: an HTTP error code 3 digits * message: a simple optional 1 line reason phrase. *( HTAB / SP / VCHAR / %x80-FF ) defaults to short entry matching the response code * explain: a detailed message defaults to the long entry matching the response code. This sends an error response (so it must be called before any output has been generated), logs the error, and finally sends a piece of HTML explaining the error to the user. )???ryNzcode %d, message %sr5r7Fquote)codemessageexplainzUTF-8replacez Content-TypeContent-LengthHEAD) responsesKeyErrorrq send_response send_headerr NO_CONTENT RESET_CONTENT NOT_MODIFIEDerror_message_formathtmlescapeencodeerror_content_typer>r2rer:rnwrite)rr}r~rshortmsglongmsgbodycontents rrHz!BaseHTTPRequestHandler.send_errors$ - $t 4 Hgg - - - , Hggg - ?G ?G ,dG<<< 4))) w///  CKK .#1#02 2 2 0;we<<<;we<<<44G >>'955D   ^T-D E E E   -s3t99~~ > > >  <6 ! !d ! J  T " " " " " " ! ! !s %%c||||||d||d|dS)zAdd the response header to the headers buffer and log the response code. Also send two standard headers with the server software version and the current date. ServerDateN) log_requestrcrversion_stringdate_time_stringrr}r~s rrz$BaseHTTPRequestHandler.send_responsesx  g... 4#6#6#8#8999 !6!6!8!899999rc|jdkrs|||jvr|j|d}nd}t|dsg|_|jd|j||fzdddSdS) zSend the response header only.r"Nrr6_headers_bufferz %s %d %s latin-1strict)r<rrkrappendrJrrs rrcz)BaseHTTPRequestHandler.send_response_onlys  : - -4>))"nT215GG G4!233 *')$  ' '*D':*;)rr}sizes rrz"BaseHTTPRequestHandler.log_request!s\ dJ ' ' :D )3t99c$ii A A A A Arc"|j|g|RdS)zLog an error. This is called when a request cannot be fulfilled. By default it passes the message on to log_message(). Arguments are the same as for log_message(). XXX This should go to the separate error log. N)r)rformatargss rrqz BaseHTTPRequestHandler.log_error,s% '$''''''rci|] }|d|d S)z\x02xr)r-cs r z!BaseHTTPRequestHandler.<s" V V V!Q a V V Vr z\\\c ||z}tj|d|d||jddS)aZLog an arbitrary message. This is used by all other logging functions. Override it if you have specific logging wishes. The first argument, FORMAT, is a format string for the message to be logged. If the format string contains any % escapes requiring parameters, they should be specified as subsequent arguments (it's just like printf!). The client ip and current date/time are prefixed to every message. Unicode control characters are replaced with escaped hex before writing the output to stderr. z - - [z]  N)sysstderrraddress_stringlog_date_time_string translate_control_char_table)rrrr~s rrz"BaseHTTPRequestHandler.log_message?s(4- --////335555!++D,DEEEEG H H H H Hrc&|jdz|jzS)z*Return the server software version string. )server_version sys_versionrfs rrz%BaseHTTPRequestHandler.version_stringYs"S(4+;;;rcn|tj}tj|dS)z@Return the current date and time formatted for a message header.NT)usegmt)timeemailutils formatdate)r timestamps rrz'BaseHTTPRequestHandler.date_time_string]s.   I{%%i%===rc tj}tj|\ }}}}}}}} } d||j|||||fz} | S)z.Return the current time formatted for logging.z%02d/%3s/%04d %02d:%02d:%02d)r localtime monthname) rnowyearmonthdayhhmmssxyzss rrz+BaseHTTPRequestHandler.log_date_time_stringcsWikk04s0C0C-eS"b"aA *T^E*D"b".> >r)MonTueWedThuFriSatSun) NJanFebMarAprMayJunJulAugSepOctNovDecc|jdS)zReturn the client address.r)client_addressrfs rrz%BaseHTTPRequestHandler.address_stringqs"1%%rHTTP/1.0c,i|]}||j|jfSr)phrase description)r-vs rrz!BaseHTTPRequestHandler.s3  AHam $r)NNr*)rr)2rrr__doc__rrZrBr __version__rDEFAULT_ERROR_MESSAGErDEFAULT_ERROR_CONTENT_TYPErr;rarYrurwrHrrcrrerrrqr> maketrans itertoolschainrangerordrrrr weekdaynamerrrJrNrO HTTPMessagerRr __members__valuesrrrrrrs=ddNck//11!44K !;.N03 )lll\$###J&&&3#3#3#3#j : : : : . . . . . . .!!! &&& A A A A ( ( (-- V VyuuT{{EE$tDTDT'U'U V V VXX%*D "HHH4<<<>>>> DCCK;;;I&&&";*L'..00IIIrrcneZdZdZdezZdddddxZZdd fd Zd Z d Z d Z dZ dZ dZdZxZS)raWSimple HTTP request handler with GET and HEAD commands. This serves files from the current directory and any of its subdirectories. The MIME type for files is determined by calling the .guess_type() method. The GET and HEAD requests are identical except that the HEAD request omits the actual contents of the file. z SimpleHTTP/zapplication/gzipapplication/octet-streamzapplication/x-bzip2zapplication/x-xz)z.gzz.Zz.bz2z.xzN directoryc|tj}tj||_t j|i|dSr*)osgetcwdfspathrsuper__init__)rrrkwargs __class__s rr z!SimpleHTTPRequestHandler.__init__sG   I9--$)&)))))rc|}|rK |||j|dS#|wxYwdS)zServe a GET request.N) send_headcopyfilernr7rfs rdo_GETzSimpleHTTPRequestHandler.do_GETsa NN      a,,,    s A Ac^|}|r|dSdS)zServe a HEAD request.N)r r7rs rdo_HEADz SimpleHTTPRequestHandler.do_HEADs4 NN     GGIIIII  rcd||j}d}tj|rCtj|j}|jds|tj |d|d|ddz|d|df}tj |}| d|| d d | dSd D]E}tj||}tj|r|}nF||S||}|dr"|tjd dS t)|d }n1#t*$r$|tjd YdSwxYw tj|}d|jvr6d|jvr, t2j|jd} | j%| t<jj } | jt<jj urt<j!|j"t<jj } | d} | | krI|tj#| |$dSn##tJtLtNtPf$rYnwxYw|tj)| d|| d tU|d| d|+|j"| |S#|$xYw)a{Common code for GET and HEAD commands. This sends the response code and MIME headers. Return value is either a file object (which has to be copied to the outputfile by the caller unless the command was HEAD, and must be closed by the caller under all circumstances), or None, in which case the caller has nothing further to do. Nr'rr r r%Locationr0)z index.htmlz index.htmzFile not foundrbzIf-Modified-Sincez If-None-Match)tzinfo) microsecond Content-typez Last-Modified),translate_pathrLrisdirurllibparseurlsplitendswithrrMOVED_PERMANENTLY urlunsplitrrerisfilelist_directory guess_typerH NOT_FOUNDopenOSErrorfstatfilenorSrrparsedate_to_datetimerrdatetimetimezoneutc fromtimestampst_mtimerr7 TypeErrorrG OverflowErrorrDOKr>r) rrLrparts new_partsnew_urlindexctypefsims last_modifs rr z"SimpleHTTPRequestHandler.send_heads""49--  7==   1L))$)44E:&&s++ "":#?@@@"1XuQxqC"1XuQx1  ,11)<<  W555  !13777  """t2 1 1 T5117>>%(( DE**4000%% ==    OOJ02B C C C4 T4  AA    OOJ02B C C C44 ' !((**%%B#t|33't|;;(+;; %89;;C z)"kk1B1FkGGzX%6%:::%-%6%D%DK):)>&@&@ &0%7%7A%7%F%F %,, ..z/FGGG ,,...GGIII#'4'":}jID*   z} - - -   ^U 3 3 3   -s2a5zz : : :   _%%bk22 4 4 4      H  GGIII sJ G*H  H :P *M5CPPM30P2M33B$PP/c  tj|}n1#t$r$|tjdYdSwxYw|dg} tj |j d}n4#t$r'tj |j }YnwxYwtj |d}tj}d |}|d |d |d |d |d|d|d|d|d|d|D]}tj ||}|x} } tj |r |dz} |dz} tj |r|dz} |dtj| ddtj | dd|dd||d} t-j} | | | d|tj|dd|z|dt;t=| || S)zHelper to produce a directory listing (absent index.html). Return value is either a file object, or None (indicating an error). In either case, the headers are sent, making the interface the same as for send_head(). zNo permission to list directoryNc*|Sr*)rX)as rz9SimpleHTTPRequestHandler.list_directory..s r)key surrogatepasserrorsFr{zDirectory listing for zzzzzz z

z

z