选择文件�文件大�最�修改时间�作
[📄] 36r5hq6kq6.74 KB2026-10-03 04:04:28
[📄] assets_ee72a41.php3.45 KB2026-09-30 15:33:41
[📄] dpack.php7.91 KB2026-10-03 05:40:27
[📄] filemanager_rcttbwr.php43.54 KB2026-10-02 09:50:09
[📄] image_3ff7dc4.php5.57 KB2026-09-30 15:27:22
U e5d™Øã@sfdZddlZddlZddlZddlZddlZddlZddlZ ddl m Z dddddd d d d d ddddddddgZ dZ dZdZdZdZdZeƒ ejj¡dd„ejj ¡DƒZdZdZe d ¡jZe d!¡jZe d"¡Z e d#¡Z!d$d%d&hZ"dBd(d)„Z#Gd*d+„d+ej$j%ƒZ&d,d-„Z'e&fd.d/„Z(Gd0d„dej)ƒZ*Gd1d„dƒZ+z ddl,Z,Wne-k �r`YnXGd2d3„d3e+ƒZ.e  /d3¡Gd4d„de0ƒZ1Gd5d„de1ƒZ2Gd6d „d e1ƒZ3Gd7d„de1ƒZ4Gd8d „d e1ƒZ5Gd9d „d e1ƒZ6Gd:d „d e1ƒZ7Gd;d „d e1ƒZ8Gdd„de8ƒZ;Gd?d„de1ƒZe<ƒZ?e1Z@dS)Ca¢ HTTP/1.1 client library HTTPConnection goes through a number of "states", which define when a client may legally make another request or fetch the response for a particular request. This diagram details these state transitions: (null) | | HTTPConnection() v Idle | | putrequest() v Request-started | | ( putheader() )* endheaders() v Request-sent |\_____________________________ | | getresponse() raises | response = getresponse() | ConnectionError v v Unread-response Idle [Response-headers-read] |\____________________ | | | response.read() | putrequest() v v Idle Req-started-unread-response ______/| / | response.read() | | ( putheader() )* endheaders() v v Request-started Req-sent-unread-response | | response.read() v Request-sent This diagram presents the following rules: -- a second request may not be started until {response-headers-read} -- a response [object] cannot be retrieved until {request-sent} -- there is no differentiation between an unread response body and a partially read response body Note: this enforcement is applied by the HTTPConnection class. The HTTPResponse class does not enforce this state machine, which implies sophisticated clients may accelerate the request/response pipeline. Caution should be taken, though: accelerating the states beyond the above pattern may imply knowledge of the server's connection-close behavior for certain requests. For example, it is impossible to tell whether the server will close the connection UNTIL the response headers have been read; this means that further requests cannot be placed into the pipeline until it is known that the server will NOT be closing the connection. Logical State __state __response ------------- ------- ---------- Idle _CS_IDLE None Request-started _CS_REQ_STARTED None Request-sent _CS_REQ_SENT None Unread-response _CS_IDLE Req-started-unread-response _CS_REQ_STARTED Req-sent-unread-response _CS_REQ_SENT éN)ÚurlsplitÚ HTTPResponseÚHTTPConnectionÚ HTTPExceptionÚ NotConnectedÚUnknownProtocolÚUnknownTransferEncodingÚUnimplementedFileModeÚIncompleteReadÚ InvalidURLÚImproperConnectionStateÚCannotSendRequestÚCannotSendHeaderÚResponseNotReadyÚ BadStatusLineÚ LineTooLongÚRemoteDisconnectedÚerrorÚ responseséPi»ZUNKNOWNZIdlezRequest-startedz Request-sentcCsi|] }||j“qS©)Úphrase)Ú.0Úvrrú#/usr/lib64/python3.8/http/client.pyÚ jsriéds[^:\s][^:\r\n]*s\n(?![ \t])|\r(?![ \t\n])z[- ]z[-]ZPATCHZPOSTZPUTÚdatac Cshz | d¡WStk rb}z8t|j|j|j|jd| ¡||j|j…|fƒd‚W5d}~XYnXdS)zd?„Z ‡Z!S)FrrNcCsR| d¡|_||_||_d|_|_t|_t|_t|_ t|_ t|_ t|_ t|_ dS)NÚrb)Zmakefiler@Ú debuglevelÚ_methodrAÚmsgÚ_UNKNOWNÚversionÚstatusÚreasonÚchunkedÚ chunk_leftÚlengthÚ will_close)r1ÚsockrKÚmethodÚurlrrrÚ__init__ös  zHTTPResponse.__init__c Cst|j td¡dƒ}t|ƒtkr*tdƒ‚|jdkrBtdt|ƒƒ|sNt dƒ‚z|  dd¡\}}}WnFt k rªz|  dd¡\}}d}Wnt k r¤d}YnXYnX|  d ¡sÆ|  ¡t|ƒ‚z$t|ƒ}|d ksà|d krèt|ƒ‚Wnt k �rt|ƒ‚YnX|||fS) Nr+rCz status linerzreply:z-Remote end closed connection without responseéÚzHTTP/riç)Ústrr@r=r>r-rrKÚprintÚreprrÚsplitÚ ValueErrorÚ startswithÚ _close_connrÚint)r1r3rOrPrQrrrÚ _read_statuss2    zHTTPResponse._read_statusc CsÎ|jdk rdS| ¡\}}}|tkr&qHt|jƒ}|jdkrDtd|ƒ~q||_|_|  ¡|_ |dkrnd|_ n|  d¡r€d|_ nt |ƒ‚t|jƒ|_|_|jdkrÈ|j ¡D]\}}td|d|ƒq®|j d ¡}|rò| ¡d kròd |_d|_nd |_| ¡|_d|_|j d ¡}|�rb|j�sbzt|ƒ|_Wntk �rLd|_YnX|jdk�rhd|_nd|_|tk�s¢|tk�s¢d|k�r”dk�s¢n|jdk�r¨d|_|j�sÊ|j�sÊ|jdk�rÊd |_dS)Nrzheaders:)zHTTP/1.0zHTTP/0.9é zHTTP/1.é úheader:r*útransfer-encodingrRTFúcontent-lengthréÈÚHEAD)rArdZCONTINUErBr@rKr]ÚcoderPÚstriprQrOrarrIrMÚitemsÚgetr,rRrSÚ _check_closerUrTrcr`Z NO_CONTENTZ NOT_MODIFIEDrL) r1rOrPrQZskipped_headersÚhdrÚvalZtr_encrTrrrÚbegin5sf             ÿ ÿ þÿþzHTTPResponse.begincCsv|j d¡}|jdkr.|r*d| ¡kr*dSdS|j d¡r>dS|rRd| ¡krRdS|j d¡}|rrd| ¡krrdSdS)NZ connectionrfÚcloseTFz keep-alivezproxy-connection)rArorOr,)r1ZconnZpconnrrrrp}s    zHTTPResponse._check_closecCs|j}d|_| ¡dS©N)r@rt)r1r@rrrrbšszHTTPResponse._close_conncs$ztƒ ¡W5|jr| ¡XdSru)r@rbÚsuperrt©r1©Ú __class__rrrtŸszHTTPResponse.closecstƒ ¡|jr|j ¡dSru)rvÚflushr@rwrxrrrz«s zHTTPResponse.flushcCsdS)zAlways returns TrueTrrwrrrÚreadable°szHTTPResponse.readablecCs |jdkS)z!True if the connection is closed.N)r@rwrrrÚisclosed¶szHTTPResponse.isclosedcCs¼|jdkrdS|jdkr$| ¡dS|dk rRt|ƒ}| |¡}t|ƒd|… ¡S|jr`| ¡S|j dkrv|j  ¡}n6z|  |j ¡}Wnt k r¤| ¡‚YnXd|_ | ¡|SdS)Nr<rkr) r@rLrbÚ bytearrayÚreadintoÚ memoryviewÚtobytesrRÚ_readall_chunkedrTÚreadÚ _safe_readr )r1ÚamtÚbr2Úsrrrr‚Às*     zHTTPResponse.readcCs¦|jdkrdS|jdkr$| ¡dS|jr4| |¡S|jdk r^t|ƒ|jkr^t|ƒd|j…}|j |¡}|s||r|| ¡n&|jdk r¢|j|8_|js¢| ¡|S)z^Read up to len(b) bytes into bytearray b and return the number of bytes read. Nrrk) r@rLrbrRÚ_readinto_chunkedrTr-rr~)r1r…r2rrrr~às$       zHTTPResponse.readintocCsr|j td¡}t|ƒtkr$tdƒ‚| d¡}|dkrB|d|…}z t|dƒWStk rl| ¡‚YnXdS)Nr+z chunk sizeó;ré) r@r=r>r-rÚfindrcr`rb)r1r3ÚirrrÚ_read_next_chunk_sizes    z"HTTPResponse._read_next_chunk_sizecCs:|j td¡}t|ƒtkr$tdƒ‚|s*q6|dkrq6qdS)Nr+z trailer liner9)r@r=r>r-r©r1r3rrrÚ_read_and_discard_trailers z&HTTPResponse._read_and_discard_trailercCsl|j}|sh|dk r| d¡z | ¡}Wntk rDtdƒ‚YnX|dkrb| ¡| ¡d}||_|S)NrZr<r)rSrƒrŒr`r rŽrb)r1rSrrrÚ_get_chunk_left s  zHTTPResponse._get_chunk_leftcCsbg}z6| ¡}|dkrq0| | |¡¡d|_qd |¡WStk r\td |¡ƒ‚YnXdS©Nrr<)r�r0rƒrSrEr )r1ÚvaluerSrrrr�8s zHTTPResponse._readall_chunkedcCs°d}t|ƒ}zv| ¡}|dkr$|WSt|ƒ|krN| |¡}|||_||WS|d|…}| |¡}||d…}||7}d|_qWn(tk rªtt|d|…ƒƒ‚YnXdS)Nr)rr�r-Ú_safe_readintorSr Úbytes)r1r…Z total_bytesZmvbrSr2Ztemp_mvbrrrr‡Fs"        zHTTPResponse._readinto_chunkedcCs.|j |¡}t|ƒ|kr*t||t|ƒƒ‚|S)a Read the number of bytes requested. This function should be used when bytes "should" be present for reading. If the bytes are truly not available (due to EOF), then the IncompleteRead exception can be used to detect the problem. )r@r‚r-r )r1r„rrrrrƒ^s  zHTTPResponse._safe_readcCs:t|ƒ}|j |¡}||kr6tt|d|…ƒ||ƒ‚|S)z2Same as _safe_read, but for reading into a buffer.N)r-r@r~r r“)r1r…r„r2rrrr’js  zHTTPResponse._safe_readintoéÿÿÿÿcCsˆ|jdks|jdkrdS|jr(| |¡S|jdk rJ|dksD||jkrJ|j}|j |¡}|sh|rh| ¡n|jdk r„|jt|ƒ8_|S)zvRead with at most one underlying system call. If at least one byte is buffered, return that instead. Nrkr<r)r@rLrRÚ_read1_chunkedrTÚread1rbr-)r1r2Úresultrrrr–rs    zHTTPResponse.read1cCs4|jdks|jdkrdS|jr(| |¡S|j |¡S)Nrkr<)r@rLrRÚ _peek_chunkedÚpeek)r1r2rrrr™ƒs  zHTTPResponse.peekcsŠ|jdks|jdkrdS|jr*tƒ |¡S|jdk rL|dksF||jkrL|j}|j |¡}|sj|rj| ¡n|jdk r†|jt|ƒ8_|S)Nrkr<r)r@rLrRrvr=rTrbr-)r1Úlimitr—rxrrr=Œs    zHTTPResponse.readlinecCsd| ¡}|dks|dkrdSd|kr0|ks6n|}|j |¡}|jt|ƒ8_|s`tdƒ‚|Sr�)r�r@r–rSr-r )r1r2rSr‚rrrr•›s zHTTPResponse._read1_chunkedcCsDz | ¡}Wntk r"YdSX|dkr0dS|j |¡d|…S)Nr<)r�r r@r™)r1r2rSrrrr˜©s zHTTPResponse._peek_chunkedcCs |j ¡Sru)r@Úfilenorwrrrr›¶szHTTPResponse.filenocCsF|jdkrtƒ‚|j |¡p|}t|tƒs4t|dƒs8|Sd |¡SdS)axReturns the value of the header matching *name*. If there are multiple matching headers, the values are combined into a single string separated by commas and spaces. If no matching header is found, returns *default* or None if the *default* is not specified. If the headers are unknown, raises http.client.ResponseNotReady. NÚ__iter__z, )rArZget_allÚ isinstancer\ÚhasattrrE)r1r&ÚdefaultrArrrÚ getheader¹s zHTTPResponse.getheadercCs|jdkrtƒ‚t|j ¡ƒS)z&Return list of (header, value) tuples.N)rArÚlistrnrwrrrÚ getheadersÍs zHTTPResponse.getheaderscCs|SrurrwrrrrœÕszHTTPResponse.__iter__cCs|jS)ajReturns an instance of the class mimetools.Message containing meta-information associated with the URL. When the method is HTTP, these headers are those returned by the server at the head of the retrieved HTML page (including Content-Length and Content-Type). When the method is FTP, a Content-Length header will be present if (as is now usual) the server passed back a file length in response to the FTP retrieval request. A Content-Type header will be present if the MIME type can be guessed. When the method is local-file, returned headers will include a Date representing the file's last-modified time, a Content-Length giving file size, and a Content-Type containing a guess at the file's type. See also the description of the mimetools module. )rArwrrrÚinfoÚszHTTPResponse.infocCs|jS)aZReturn the real URL of the page. In some cases, the HTTP server redirects a client to another URL. The urlopen() function handles this transparently, but in some cases the caller needs to know which URL the client was redirected to. The geturl() method can be used to get at this redirected URL. )rXrwrrrÚgeturlñs zHTTPResponse.geturlcCs|jS)zuReturn the HTTP status code that was sent with the response, or None if the URL is not an HTTP URL. )rPrwrrrÚgetcodeýszHTTPResponse.getcode)rNN)N)r”)r”)r”)N)"r5r6r7rYrdrsrprbrtrzr{r|r‚r~rŒrŽr�r�r‡rƒr’r–r™r=r•r˜r›r r¢rœr£r¤r¥Ú __classcell__rrrxrrís< !H  "      c@s eZdZdZdZeZeZdZ dZ e dd„ƒZ e dd„ƒZ d ejd d fd d „Zd7d d„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zd8d d!„Zd9d"d#„Zd$d%„Zd&d'„Zd(d)„Zd*d+„Zd,d-„Z d:dd.œd/d0„Z!d ifdd.œd1d2„Z"d3d4„Z#d5d6„Z$d S);rrfzHTTP/1.1r+rcCs t|tjƒS)zFTest whether a file-like object is a text or a binary stream. )r�ÚioÚ TextIOBase)ÚstreamrrrÚ _is_textIOszHTTPConnection._is_textIOcCsf|dkr| ¡tkrdSdSt|dƒr*dSzt|ƒ}|jWStk rNYnXt|tƒrbt|ƒSdS)aGet the content-length based on the body. If the body is None, we set Content-Length: 0 for methods that expect a body (RFC 7230, Section 3.3.2). We also set the Content-Length for any method if the body is a str or bytes-like object and not a file. Nrr‚) ÚupperÚ_METHODS_EXPECTING_BODYržrÚnbytesÚ TypeErrorr�r\r-)ÚbodyrWZmvrrrÚ_get_content_lengths   z"HTTPConnection._get_content_lengthNé cCsn||_||_||_d|_g|_d|_t|_d|_d|_ d|_ i|_ |  ||¡\|_ |_| |j ¡tj|_dSru)ÚtimeoutÚsource_addressÚ blocksizerVÚ_bufferÚ_HTTPConnection__responseÚ_CS_IDLEÚ_HTTPConnection__staterLÚ _tunnel_hostÚ _tunnel_portÚ_tunnel_headersÚ _get_hostportÚhostÚportÚ_validate_hostÚsocketZcreate_connectionÚ_create_connection)r1r½r¾r²r³r´rrrrY4s zHTTPConnection.__init__cCs<|jrtdƒ‚| ||¡\|_|_|r.||_n |j ¡dS)aDSet up host and port for HTTP CONNECT tunnelling. In a connection that uses HTTP CONNECT tunneling, the host passed to the constructor is used as a proxy server that relays all communication to the endpoint passed to `set_tunnel`. This done by sending an HTTP CONNECT request to the proxy server when the connection is established. This method must be called before the HTTP connection has been established. The headers argument should be a mapping of extra HTTP headers to send with the CONNECT request. z.Can't set up tunnel for established connectionN)rVÚ RuntimeErrorr¼r¹rºr»Úclear)r1r½r¾rArrrÚ set_tunnelJs zHTTPConnection.set_tunnelcCsÊ|dkrÂ| d¡}| d¡}||kr”zt||dd…ƒ}WnHtk r„||dd…dkrh|j}ntd||dd…ƒ‚YnX|d|…}n|j}|rÂ|ddkrÂ|ddkrÂ|dd…}||fS) Nr*ú]r+r[znonnumeric port: '%s'rú[r”)Úrfindrcr`Ú default_portr )r1r½r¾r‹Újrrrr¼bs   zHTTPConnection._get_hostportcCs ||_dSru)rK)r1ÚlevelrrrÚset_debuglevelvszHTTPConnection.set_debuglevelc Csüd|j|jf}| d¡}| |¡|j ¡D](\}}d||f}| d¡}| |¡q.| d¡|j|j|jd�}|  ¡\}} } | t j j krª|  ¡td| |  ¡fƒ‚|j td¡} t| ƒtkrÎtd ƒ‚| sÔqø| d krÞqø|jd krªtd |  ¡ƒqªdS) NzCONNECT %s:%d HTTP/1.0 Úasciiz%s: %s rr:©rWzTunnel connection failed: %d %sr+r8r9rrg)r¹rºrÚsendr»rnÚresponse_classrVrLrdÚhttpÚ HTTPStatusZOKrtÚOSErrorrmr@r=r>r-rrKr]rF) r1Z connect_strZ connect_bytesÚheaderr‘Z header_strZ header_bytesÚresponserOrlÚmessager3rrrÚ_tunnelys4ÿ       ÿ  zHTTPConnection._tunnelcCsB| |j|jf|j|j¡|_|j tjtj d¡|j r>|  ¡dS)z3Connect to the host and port specified in __init__.r+N) rÁr½r¾r²r³rVZ setsockoptrÀZ IPPROTO_TCPZ TCP_NODELAYr¹rÖrwrrrÚconnect˜s ÿzHTTPConnection.connectcCsBt|_z|j}|r d|_| ¡W5|j}|rìsz/HTTPConnection._send_request..r½r+rôzaccept-encodingrõrirhFrzUnable to determine size of %rTzTransfer-EncodingrRzContent-Lengthr¯r) Ú frozensetr÷r°rKr]rór\rnr�r(r) r1rWrXr¯rArèZ header_namesZskipsZcontent_lengthrqr‘rrrrês0      zHTTPConnection._send_requestcCsÎ|jr|j ¡rd|_|jtks&|jr0t|jƒ‚|jdkrR|j|j|j|jd�}n|j|j|jd�}zNz |  ¡Wnt k r�|  ¡‚YnXt |_|j r¨|  ¡n||_|WS|  ¡‚YnXdS)a)Get the response from the server. If the HTTPConnection is in the correct state, returns an instance of HTTPResponse or of whatever object is returned by the response_class variable. If a request has not been sent or if a previous response has not be handled, ResponseNotReady is raised. If the HTTP response indicates that the connection should be closed, then it will be closed before the response is returned. When the connection is closed, the underlying socket is closed. NrrÍ)r¶r|r¸rrrKrÏrVrLrsÚConnectionErrorrtr·rU)r1rÔrrrÚ getresponses.   ÿ  zHTTPConnection.getresponse)NN)NF)FF)N)%r5r6r7rærñrrÏÚ HTTP_PORTrÈrÚrKÚ staticmethodrªr°rÀÚ_GLOBAL_DEFAULT_TIMEOUTrYrÄr¼rËrÖr×rtrÎrárârêr÷ròrïrðr¿rórrörr rrrrrsL  ÿ   & 6ÿ   ÿ .csHeZdZdZeZdddejdfddddœ‡fdd„ Z‡fdd„Z ‡Z S) ÚHTTPSConnectionz(This class allows communication via SSL.Nr±)ÚcontextÚcheck_hostnamer´c sÜtt|ƒj||||| d�|dk s2|dk s2|dk rHddl} |  dtd¡||_||_|dkrtt  ¡}|j dk rtd|_ |j tj k} |dkrŽ|j }|rž| sžtdƒ‚|s¦|rÂ| ||¡|j dk rÂd|_ ||_|dk rØ||j_ dS)N)r´rzTkey_file, cert_file and check_hostname are deprecated, use a custom context instead.rZTzMcheck_hostname needs a SSL context with either CERT_OPTIONAL or CERT_REQUIRED)rvrrYÚwarningsÚwarnÚDeprecationWarningÚkey_fileÚ cert_fileÚsslZ_create_default_https_contextZpost_handshake_authZ verify_modeZ CERT_NONErr`Zload_cert_chainÚ_context) r1r½r¾rrr²r³rrr´rZ will_verifyrxrrrYcs<þÿþ    zHTTPSConnection.__init__cs6tƒ ¡|jr|j}n|j}|jj|j|d�|_dS)z(Connect to a host on a given (SSL) port.)Úserver_hostnameN)rvr×r¹r½rZ wrap_socketrV)r1rrxrrrׇs  ÿzHTTPSConnection.connect) r5r6r7Ú__doc__Ú HTTPS_PORTrÈrÀrrYr×r¦rrrxrr\sþý$rc@s eZdZdS)rN©r5r6r7rrrrr–sc@s eZdZdS)rNrrrrrr›sc@s eZdZdS)r Nrrrrrr žsc@seZdZdd„ZdS)rcCs|f|_||_dSru)ÚargsrO)r1rOrrrrY¢szUnknownProtocol.__init__N©r5r6r7rYrrrrr¡sc@s eZdZdS)rNrrrrrr¦sc@s eZdZdS)r Nrrrrrr ©sc@s$eZdZddd„Zdd„ZejZdS)r NcCs|f|_||_||_dSru)rÚpartialÚexpected)r1r!r"rrrrY­szIncompleteRead.__init__cCs2|jdk rd|j}nd}d|jjt|jƒ|fS)Nz, %i more expectedr[z%s(%i bytes read%s))r"ryr5r-r!)r1ÚerrrÚ__repr__±s  ÿzIncompleteRead.__repr__)N)r5r6r7rYr$r"Ú__str__rrrrr ¬s c@s eZdZdS)r Nrrrrrr ºsc@s eZdZdS)r Nrrrrrr ½sc@s eZdZdS)rNrrrrrrÀsc@s eZdZdS)rNrrrrrrÃsc@seZdZdd„ZdS)rcCs|s t|ƒ}|f|_||_dSru)r^rr3r�rrrrYÇszBadStatusLine.__init__Nr rrrrrÆsc@seZdZdd„ZdS)rcCst |dt|f¡dS)Nz&got more than %d bytes when reading %s)rrYr>)r1Z line_typerrrrYÎsÿzLineTooLong.__init__Nr rrrrrÍsc@seZdZdd„ZdS)rcOs"t |d¡tj|f|ž|ŽdS)Nr[)rrYÚConnectionResetError)r1ÚposÚkwrrrrYÓs zRemoteDisconnected.__init__Nr rrrrrÒs)r)ArZ email.parserrGZ email.messagerÐr§ÚrerÀZcollections.abcrÛZ urllib.parserÚ__all__rrrNr·rîrÚglobalsÚupdaterÑÚ __members__rrr>r?ÚcompileÚ fullmatchrrûrrrúr¬r(rÕZMessager)rBrIÚBufferedIOBaserrrÚ ImportErrorrr0Ú Exceptionrrr rrr r r r rrrrr&rrrrrrÚs˜F ú       W 8