/usr/lib/python2.6/site-packages/requests
NameSizeModeActions
packages/-0755rm
adapters.py168100644editdlrm
adapters.pyc158050644editdlrm
adapters.pyo158050644editdlrm
api.py52800644editdlrm
api.pyc60350644editdlrm
api.pyo60350644editdlrm
auth.py67100644editdlrm
auth.pyc75850644editdlrm
auth.pyo75850644editdlrm
cacert.pem3084340644editdlrm
certs.py6490644editdlrm
certs.pyc9010644editdlrm
certs.pyo9010644editdlrm
compat.py15490644editdlrm
compat.pyc17000644editdlrm
compat.pyo17000644editdlrm
cookies.py167910644editdlrm
cookies.pyc204060644editdlrm
cookies.pyo204060644editdlrm
exceptions.py25170644editdlrm
exceptions.pyc52880644editdlrm
exceptions.pyo52880644editdlrm
hooks.py8200644editdlrm
hooks.pyc10660644editdlrm
hooks.pyo10660644editdlrm
models.py281560644editdlrm
models.pyc251620644editdlrm
models.pyo251620644editdlrm
sessions.py244760644editdlrm
sessions.pyc200580644editdlrm
sessions.pyo200580644editdlrm
status_codes.py32000644editdlrm
status_codes.pyc44700644editdlrm
status_codes.pyo44700644editdlrm
structures.py29770644editdlrm
structures.pyc51500644editdlrm
structures.pyo51500644editdlrm
utils.py213340644editdlrm
utils.pyc206770644editdlrm
utils.pyo206770644editdlrm
__init__.py18610644editdlrm
__init__.pyc25190644editdlrm
__init__.pyo25190644editdlrm
Edit: /usr/lib/python2.6/site-packages/requests/auth.pyc (7585B)
Ñò 4£ëTc @sdZddkZddkZddkZddkZddklZddklZl Z ddk l Z ddk l Z lZddklZd Zd Zd „Zd efd „ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdS(s] requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. iÿÿÿÿN(t b64encodei(turlparsetstr(textract_cookies_to_jar(tparse_dict_headertto_native_string(tcodess!application/x-www-form-urlencodedsmultipart/form-datacCs3dttd||fidƒƒiƒƒ}|S(sReturns a Basic Auth string.sBasic s%s:%stlatin1(RRtencodetstrip(tusernametpasswordtauthstr((s1/usr/lib/python2.6/site-packages/requests/auth.pyt_basic_auth_strs)tAuthBasecBseZdZd„ZRS(s4Base class that all auth implementations derive fromcCstdƒ‚dS(NsAuth hooks must be callable.(tNotImplementedError(tselftr((s1/usr/lib/python2.6/site-packages/requests/auth.pyt__call__'s(t__name__t __module__t__doc__R(((s1/usr/lib/python2.6/site-packages/requests/auth.pyR$st HTTPBasicAuthcBs eZdZd„Zd„ZRS(s?Attaches HTTP Basic Authentication to the given Request object.cCs||_||_dS(N(R R (RR R ((s1/usr/lib/python2.6/site-packages/requests/auth.pyt__init__-s cCs t|i|iƒ|id<|S(Nt Authorization(R R R theaders(RR((s1/usr/lib/python2.6/site-packages/requests/auth.pyR1s(RRRRR(((s1/usr/lib/python2.6/site-packages/requests/auth.pyR+s t HTTPProxyAuthcBseZdZd„ZRS(s=Attaches HTTP Proxy Authentication to a given Request object.cCs t|i|iƒ|id<|S(NsProxy-Authorization(R R R R(RR((s1/usr/lib/python2.6/site-packages/requests/auth.pyR8s(RRRR(((s1/usr/lib/python2.6/site-packages/requests/auth.pyR6stHTTPDigestAuthcBs;eZdZd„Zd„Zd„Zd„Zd„ZRS(s@Attaches HTTP Digest Authentication to the given Request object.cCsC||_||_d|_d|_h|_d|_d|_dS(Ntii(R R t last_noncet nonce_counttchaltNonetpost num_401_calls(RR R ((s1/usr/lib/python2.6/site-packages/requests/auth.pyR?s      csC|id}|id}|iidƒ}|iidƒ}|iidƒ}|djo d}n |iƒ}|djp |djod„} | ‰n!|d jod „} | ‰n‡fd †} ˆdjodSd} t|ƒ} | i}| io|d | i7}nd |i||if}d||f}ˆ|ƒ}ˆ|ƒ}||i jo|i d7_ n d|_ d|i }t |i ƒi dƒ}||i dƒ7}|t iƒi dƒ7}|tidƒ7}ti|ƒiƒd }|djoˆd |||fƒ}n|djo| |d||fƒ}nT|djpd|idƒjo,d|||d|f}| ||ƒ}ndS||_ d|i||||f}|o|d|7}n|o|d|7}n| o|d| 7}n|o|d||f7}nd|S(Ntrealmtnoncetqopt algorithmtopaquetMD5sMD5-SESScSs6t|tƒo|idƒ}nti|ƒiƒS(Nsutf-8(t isinstanceRRthashlibtmd5t hexdigest(tx((s1/usr/lib/python2.6/site-packages/requests/auth.pytmd5_utf8VstSHAcSs6t|tƒo|idƒ}nti|ƒiƒS(Nsutf-8(R)RRR*tsha1R,(R-((s1/usr/lib/python2.6/site-packages/requests/auth.pytsha_utf8\scsˆd||fƒS(s%s:%s((tstd(t hash_utf8(s1/usr/lib/python2.6/site-packages/requests/auth.pytbst?s%s:%s:%ss%s:%sis%08xsutf-8iitautht,s%s:%s:%s:%s:%ss>username="%s", realm="%s", nonce="%s", uri="%s", response="%s"s , opaque="%s"s, algorithm="%s"s , digest="%s"s , qop="auth", nc=%s, cnonce="%s"s Digest %s(RtgetR tupperRtpathtqueryR R RRRRttimetctimetosturandomR*R0R,tsplit(RtmethodturlR#R$R%R&R't _algorithmR.R1tKDtentdigtp_parsedR;tA1tA2tHA1tHA2tncvalueR2tcnoncetrespdigtnoncebittbase((R4s1/usr/lib/python2.6/site-packages/requests/auth.pytbuild_digest_headerHsp                    # cKs|io d|_ndS(s)Reset num_401_calls counter on redirects.iN(t is_redirectR"(RRtkwargs((s1/usr/lib/python2.6/site-packages/requests/auth.pythandle_redirects cKsd|id j o|iii|iƒnt|ddƒ}|iiddƒ}d|iƒjoó|djoæ|i d7_ t i ddt i ƒ}t |id|d dƒƒ|_|i|iiƒ|iiƒ}t|i|i|iƒ|i|iƒ|i|i|iƒ|id <|ii||}|ii|ƒ||_|Sd|_ |S( s:Takes the given response and tries digest-auth, if needed.R"iswww-authenticateRtdigestisdigest tflagstcountRN(R!R trequesttbodytseektgetattrRR9tlowerR"tretcompilet IGNORECASERtsubRtcontenttrawt release_conntcopyRt_cookiestprepare_cookiesRQRBRCt connectiontsendthistorytappend(RRRSR"ts_authtpattprept_r((s1/usr/lib/python2.6/site-packages/requests/auth.pyt handle_401¢s* !   cCsŒ|io#|i|i|iƒ|ids