Files
PowerToys/PythonHome/Lib/_MozillaCookieJar.pyc

56 lines
4.5 KiB
Plaintext
Raw Normal View History

2014-07-09 18:15:23 +08:00
<03>
<EFBFBD>W`Sc@s`dZddlZddlZddlmZmZmZmZmZdefd<00><00>YZ dS(s+Mozilla / Netscape cookie loading / saving.i<><69><EFBFBD><EFBFBD>N(t_warn_unhandled_exceptiont FileCookieJart LoadErrortCookietMISSING_FILENAME_TEXTtMozillaCookieJarcBs5eZdZdZdZd<00>Zdeed<00>ZRS(s<>
WARNING: you may want to backup your browser's cookies file if you use
this class to save cookies. I *think* it works, but there have been
bugs in the past!
This class differs from CookieJar only in the format it uses to save and
load cookies to and from a file. This class uses the Mozilla/Netscape
`cookies.txt' format. lynx uses this file format, too.
Don't expect cookies saved while the browser is running to be noticed by
the browser (in fact, Mozilla on unix will overwrite your saved cookies if
you change them on disk while it's running; on Windows, you probably can't
save at all while the browser is running).
Note that the Mozilla/Netscape format will downgrade RFC2965 cookies to
Netscape cookies on saving.
In particular, the cookie version and port number information is lost,
together with information about whether or not Path, Port and Discard were
specified by the Set-Cookie2 (or Set-Cookie) header, and whether or not the
domain as set in the HTTP header started with a dot (yes, I'm aware some
domains in Netscape files start with a dot and some don't -- trust me, you
really don't want to know any more about this).
Note that though Mozilla and Netscape use the same format, they use
slightly different headers. The class saves cookies using the Netscape
header by default (Mozilla can cope with that).
s#( Netscape)? HTTP Cookie Filesr# Netscape HTTP Cookie File
# http://curl.haxx.se/rfc/cookie_spec.html
# This is a generated file! Do not edit.
2014-07-10 23:57:08 +08:00
cCstj<00>}|j<00>}tj|j|<00>sJ|j<00>td|<16><00>ny<>xy|j<00>}|dkrlPn|jd<00>r<>|d }n|j<00>j d <00>sP|j<00>dkr<>qPn|j
2014-07-09 18:15:23 +08:00
d<00>\}} }
} } } }| dk} | dk} | dkr |} d}n|j d <00>}| |ks-t <00>t }| dkrNd} t}ntd
| |dt || ||
t | | |ddi<00>}| r<>|jr<>qPn| r<>|j|<00>r<>qPn|j|<00>qPWnAtk
r<><01>n.tk
r t<00>td ||f<16><00>nXdS( Ns4%r does not look like a Netscape format cookies filets
i<EFBFBD><EFBFBD><EFBFBD><EFBFBD>t#t$s tTRUEt.is+invalid Netscape format cookies file %r: %r(RR(ttimetreadlinetretsearchtmagic_retcloseRtendswithtstript
startswithtsplittNonetAssertionErrortFalsetTrueRtdiscardt
is_expiredt
2014-07-10 23:57:08 +08:00
set_cookietIOErrort ExceptionR(tselftftfilenametignore_discardtignore_expirestnowtmagictlinetdomaintdomain_specifiedtpathtsecuretexpirestnametvaluet initial_dotRtc((sFe:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\_MozillaCookieJar.pyt _really_load/sd  
    $           c Cs<>|dkr6|jdk r'|j}q6tt<00><00>nt|d<00>}z+|j|j<00>tj<00>}x|D]}| r<>|jr<>qkn| r<>|j |<00>r<>qkn|j
2014-07-09 18:15:23 +08:00
r<>d}nd}|j j d<00>r<>d}nd}|j dk r<>t|j <00>} nd} |jdkr$d}
|j} n|j}
|j} |jdj|j ||j|| |
| g<00>d<17>qkWWd|j<00>XdS(NtwR tFALSER
Rs s
(RR t
2014-07-10 23:57:08 +08:00
ValueErrorRtopentwritetheaderR RRR)R&RR*tstrR,R+tjoinR(R( RR R!R"RR#tcookieR)R-R*R+R,((sFe:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\_MozillaCookieJar.pytsaveqs@         N( t__name__t
__module__t__doc__RR5R/RRR9(((sFe:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\_MozillaCookieJar.pyRs
2014-07-09 18:15:23 +08:00
 B(
2014-07-10 23:57:08 +08:00
R<R R t cookielibRRRRRR(((sFe:\github\Wox.JSONRPC\Output\Debug\PythonHome\lib\_MozillaCookieJar.pyt<module>s(