uawdijnntqw1x1x1
IP : 3.138.119.136
Hostname : ns1.eurodns.top
Kernel : Linux ns1.eurodns.top 4.18.0-553.5.1.lve.1.el7h.x86_64 #1 SMP Fri Jun 14 14:24:52 UTC 2024 x86_64
Disable Function : mail,sendmail,exec,passthru,shell_exec,system,popen,curl_multi_exec,show_source,eval,open_base
OS : Linux
PATH:
/
home
/
..
/
var
/
..
/
opt
/
..
/
lib64
/
python2.7
/
SimpleHTTPServer.pyo
/
/
� �mec@s�dZdZdgZddlZddlZddlZddlZddlZddlZddl Z ddl Z yddlmZWn!e k r�ddlmZnXdejfd��YZeejd�Zedkr�e�ndS( s�Simple HTTP Server. This module builds on BaseHTTPServer by implementing the standard GET and HEAD requests in a fairly straightforward manner. s0.6tSimpleHTTPRequestHandleri����N(tStringIOcBs�eZdZdeZd�Zd�Zd�Zd�Zd�Z d�Z d�Zej skej�nejj�Zejid d 6dd6dd 6dd6�RS(sWSimple HTTP request handler with GET and HEAD commands. This serves files from the current directory and any of its subdirectories. The MIME type for files is determined by calling the .guess_type() method. The GET and HEAD requests are identical except that the HEAD request omits the actual contents of the file. sSimpleHTTP/cCs6|j�}|r2|j||j�|j�ndS(sServe a GET request.N(t send_headtcopyfiletwfiletclose(tselftf((s(/usr/lib64/python2.7/SimpleHTTPServer.pytdo_GET*scCs#|j�}|r|j�ndS(sServe a HEAD request.N(RR(RR((s(/usr/lib64/python2.7/SimpleHTTPServer.pytdo_HEAD1scCs}|j|j�}d}tjj|�r�|jjd�sn|jd�|jd|jd�|j�dSxOdD]7}tjj ||�}tjj |�ru|}PququW|j|�Sn|j|�}yt |d�}Wn"tk r|jdd�dSX|jd �|jd |�tj|j��}|jdt|d��|jd |j|j��|j�|S(s{Common code for GET and HEAD commands. This sends the response code and MIME headers. Return value is either a file object (which has to be copied to the outputfile by the caller unless the command was HEAD, and must be closed by the caller under all circumstances), or None, in which case the caller has nothing further to do. t/i-tLocations index.htmls index.htmtrbi�sFile not foundi�sContent-typesContent-Lengthis Last-ModifiedN(s index.htmls index.htm(ttranslate_pathtpathtNonetostisdirtendswitht send_responsetsend_headertend_headerstjointexiststlist_directoryt guess_typetopentIOErrort send_errortfstattfilenotstrtdate_time_stringtst_mtime(RRRtindextctypetfs((s(/usr/lib64/python2.7/SimpleHTTPServer.pyR7s6 cCs�ytj|�}Wn%tjk r:|jdd�dSX|jdd��t�}tjt j |j��}|jd�|jd|�|jd|�|jd�x�|D]�}tjj ||�}|}}tjj|�r|d }|d }ntjj|�r"|d }n|jdt j|�tj|�f�q�W|jd�|j�} |jd �|jd�tj�} |jdd| �|jdt| ��|j�|S(s�Helper to produce a directory listing (absent index.html). Return value is either a file object, or None (indicating an error). In either case, the headers are sent, making the interface the same as for send_head(). i�sNo permission to list directorytkeycSs |j�S(N(tlower(ta((s(/usr/lib64/python2.7/SimpleHTTPServer.pyt<lambda>pss7<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">s/<html> <title>Directory listing for %s</title> s)<body> <h2>Directory listing for %s</h2> s <hr> <ul> R t@s<li><a href="%s">%s</a> s</ul> <hr> </body> </html> ii�sContent-typestext/html; charset=%ssContent-LengthN(RtlistdirterrorRRtsortRtcgitescapeturllibtunquoteRtwriteRRtislinktquotettelltseekRtsystgetfilesystemencodingRRR(RRtlistRtdisplaypathtnametfullnametdisplaynametlinknametlengthtencoding((s(/usr/lib64/python2.7/SimpleHTTPServer.pyRcs> $ cCs�|jdd�d}|jdd�d}tjtj|��}|jd�}td|�}tj�}xq|D]i}tj j |�\}}tj j|�\}}|tjtjfkr�quntj j ||�}quW|S(s�Translate a /-separated PATH to the local filename syntax. Components that mean special things to the local file system (e.g. drive or directory names) are ignored. (XXX They should probably be diagnosed.) t?iit#R N(tsplitt posixpathtnormpathR/R0tfilterRRtgetcwdRt splitdrivetcurdirtpardirR(RRtwordstwordtdrivethead((s(/usr/lib64/python2.7/SimpleHTTPServer.pyR �s cCstj||�dS(s�Copy all data between two file objects. The SOURCE argument is a file object open for reading (or anything with a read() method) and the DESTINATION argument is a file object open for writing (or anything with a write() method). The only reason for overriding this would be to change the block size or perhaps to replace newlines by CRLF -- note however that this the default server uses this to copy binary data as well. N(tshutiltcopyfileobj(Rtsourcet outputfile((s(/usr/lib64/python2.7/SimpleHTTPServer.pyR�scCsdtj|�\}}||jkr/|j|S|j�}||jkrU|j|S|jdSdS(s�Guess the type of a file. Argument is a PATH (a filename). Return value is a string of the form type/subtype, usable for a MIME Content-type header. The default implementation looks the file's extension up in the table self.extensions_map, using application/octet-stream as a default; however it would be permissible (if slow) to look inside the data to make a better guess. tN(RCtsplitexttextensions_mapR&(RRtbasetext((s(/usr/lib64/python2.7/SimpleHTTPServer.pyR�ssapplication/octet-streamRRs text/plains.pys.cs.h(t__name__t __module__t__doc__t__version__tserver_versionRR RRR RRt mimetypestinitedtinitt types_maptcopyRTtupdate(((s(/usr/lib64/python2.7/SimpleHTTPServer.pyRs" , * cCstj||�dS(N(tBaseHTTPServerttest(tHandlerClasstServerClass((s(/usr/lib64/python2.7/SimpleHTTPServer.pyRc�st__main__(RYRZt__all__RRCRbR/R-R6RNR\t cStringIORtImportErrortBaseHTTPRequestHandlerRt HTTPServerRcRW(((s(/usr/lib64/python2.7/SimpleHTTPServer.pyt<module>s& �
/home/../var/../opt/../lib64/python2.7/SimpleHTTPServer.pyo