Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : fdshops ( 1003)
PHP Version : 8.2.21
Disable Function : NONE
Directory :  /lib/python2.7/site-packages/requests_toolbelt/auth/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyo
�
ӵ Yc@sodZddlmZddlmZddlmZmZdejfd��YZ	de	fd	��YZ
d
S(s-The module containing the code for GuessAuth.i����(tauth(tcookiesi(t_digest_auth_compatthttp_proxy_digestt	GuessAuthcBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(s7Guesses the auth type by the WWW-Authentication header.cCs(||_||_d|_d|_dS(N(tusernametpasswordtNoneRtpos(tselfRR((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyt__init__s			cCs�|jdk	r(|jjj|j�n|j|jj�|jj�}t	|d�slt
j�|_nt
j
|j|j|j�|j|j�tj|j|j�|_|j|�}|jj||�}|jj|�||_|S(Nt_cookies(RRtrequesttbodytseektcontenttrawtrelease_conntcopythasattrRtRequestsCookieJarRtextract_cookies_to_jartprepare_cookiesRt
HTTPBasicAuthRRt
connectiontsendthistorytappend(R	trtkwargstprept_r((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyt_handle_basic_auth_401s
	cCs�tj|j|j�|_y|jj�Wntk
r?nXt|jd�rs|jjdkrsd|j_n|jj
||�S(Nt
num_401_callsi(tauth_compattHTTPDigestAuthRRRtinit_per_thread_statetAttributeErrorRR!Rt
handle_401(R	RR((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyt_handle_digest_auth_401's
cKsW|jjdd�j�}d|kr7|j||�Sd|krS|j||�SdS(s/Resends a request with auth headers, if needed.swww-authenticatettbasictdigestN(theaderstgettlowerR R'(R	RRtwww_authenticate((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyR&:s
cCs]|jdk	r|j|�Sy|jj�|_Wntk
rEnX|jd|j�|S(Ntresponse(RRR
ttellRR%t
register_hookR&(R	R((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyt__call__Es

(t__name__t
__module__t__doc__R
R R'R&R2(((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyR	s				tGuessProxyAuthcBsGeZdZddddd�Zd�Zd�Zd�Zd�ZRS(sZ
    Guesses the auth type by WWW-Authentication and Proxy-Authentication
    headers
    cCs8tt|�j||�||_||_d|_dS(N(tsuperR6R
tproxy_usernametproxy_passwordRt
proxy_auth(R	RRR8R9((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyR
Ws		cCs�|jdk	r(|jjj|j�n|j|jj�|jj�}t	|d�slt
j�|_nt
j
|j|j|j�|j|j�tj|j|j�|_|j|�}|jj||�}|jj|�||_|S(NR(RRRR
RRRRRRRRRRRRt
HTTPProxyAuthR8R9R:RRRR(R	RRRR((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyt_handle_basic_auth_407^s 
	cCsYtjd|jd|j�|_y|jj�Wntk
rEnX|jj||�S(NRR(	RtHTTPProxyDigestAuthR8R9R:RR$R%t
handle_407(R	RR((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyt_handle_digest_auth_407ss		
cKsW|jjdd�j�}d|kr7|j||�Sd|krS|j||�SdS(NsProxy-AuthenticateR(R)R*(R+R,R-R<R?(R	RRtproxy_authenticate((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyR>s
cCst|jdk	r!|j|�}ny|jj�|_Wntk
rJnX|jd|j�tt	|�j
|�S(NR/(R:RR
R0RR%R1R>R7R6R2(R	R((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyR2�s
N(	R3R4R5RR
R<R?R>R2(((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyR6Rs				N(R5trequestsRRR(RR"RtAuthBaseRR6(((s@/usr/lib/python2.7/site-packages/requests_toolbelt/auth/guess.pyt<module>s
I

Spamworldpro Mini