Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.15.232.244
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : ssl_servers.pyo
�
?��cc@s0ddlZddlZddlZddlZddlZddlZddlmZm	Z	ddl
mZddlm
Zejd�Zejje�ZejZejjed�Zdefd��YZd	efd
��YZde	fd��YZd
ejfd��YZdeedd�Zedkr,ddl Z e j!dd�Z"e"j#ddde$dddd�e"j#ddddde%dddd �e"j#d!d"dd#de&dd$dd%�e"j#d&dd'de'dd(dd)�e"j#d*dd+de'dd,�e"j#d-dd.de'dd(dd/�e"j(�Z)e)j*e_*e)j+r\eZ,neZ,ej-�e,_.ej/ej0j1�Z2e2j3e�e)j4r�e2j5e)j4�ne)j6r�e2j7e)j6�ne)j8r�e2j9e)j8�ned0e)j:fe,e2�Z;e)j*rd1j<e)�GHne;j=d2�ndS(3i����N(t
HTTPServertBaseHTTPRequestHandler(tSimpleHTTPRequestHandler(ttest_supportt	threadingskeycert.pemtHTTPSServercBs,eZd�Zd�Zd�Zd�ZRS(cCs tj|||�||_dS(N(t_HTTPServert__init__tcontext(tselftserver_addresst
handler_classR((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pyRscCsd|jj|j|jfS(Ns
<%s %s:%s>(t	__class__t__name__tserver_nametserver_port(R	((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pyt__str__s	cCsty1|jj�\}}|jj|dt�}Wn6tk
ri}tjrctj	j
d|�n�nX||fS(Ntserver_sidesGot an error:
%s
(tsockettacceptRtwrap_sockettTruetOSErrortsupporttverbosetsyststderrtwrite(R	tsocktaddrtsslconnte((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pytget_request!s	cCs#tjrtj|||�ndS(s&Suppose noisy error output by default.N(RRRthandle_error(R	trequesttclient_address((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pyR!-s	(R
t
__module__RRR R!(((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pyRs			tRootedHTTPRequestHandlercBs,eZdZeZdZd�Zd�ZRS(s
TestHTTPS/1.0icCs�tj|�d}tjjtj|��}|jd�}td|�}|j	}xS|D]K}tjj
|�\}}tjj|�\}}tjj||�}q\W|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.)

        it/N(turlparsetostpathtnormpathturllibtunquotetsplittfiltertNonetroott
splitdrivetjoin(R	R)twordstwordtdrivethead((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pyttranslate_path<s		
cGsRtjrNtjjd|jj|jj|jj	�|j
�||f�ndS(Ns server (%s:%d %s):
   [%s] %s
(RRRtstdoutRtserverR
RR"tciphertlog_date_time_string(R	tformattargs((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pytlog_messagePs				(R
R$tserver_versionthereR0ttimeoutR7R>(((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pyR%2s
	tStatsRequestHandlercBs2eZdZdZed�Zd�Zd�ZRS(sSExample HTTP request handler which returns SSL statistics on GET
    requests.
    sStatsHTTPS/1.0cCs�|jjj}|j}i|j�d6|j�d6|j�d6}tj|�}|j	d�}|j
d�|jdd�|jdtt
|���|j�|r�|jj|�nd	S(
sServe a GET request.t
session_cacheR:tcompressionsutf-8i�sContent-typestext/plain; charset=utf-8sContent-LengthN(trfiletrawt_sockRt
session_statsR:RDtpprinttpformattencodet
send_responsetsend_headertstrtlentend_headerstwfileR(R	t	send_bodyRRtstatstbody((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pytdo_GETbs	



cCs|jdt�dS(sServe a HEAD request.RRN(RUtFalse(R	((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pytdo_HEADtscGs#tjrtj|||�ndS(N(RRRtlog_request(R	R<R=((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pyRXxs	(R
R$t__doc__R?RRURWRX(((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pyRB[s
	tHTTPSServerThreadcBs>eZedd�Zd�Zdd�Zd�Zd�ZRS(cCsVd|_t|df|pt|�|_|jj|_tjj	|�t
|_dS(Ni(R/tflagRR%R9RtportRtThreadRRtdaemon(R	RthostR((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pyRs		cCsd|jj|jfS(Ns<%s %s>(RR
R9(R	((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pyR�scCs||_tjj|�dS(N(R[RR]tstart(R	R[((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pyR`�s	cCsB|jr|jj�nz|jjd�Wd|jj�XdS(Ng�������?(R[tsetR9t
serve_forevertserver_close(R	((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pytrun�s
	cCs|jj�dS(N(R9tshutdown(R	((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pytstop�sN(	R
R$tHOSTR/RRR`RdRf(((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pyRZ}s
			cs�|dkr$tjtjj�}n|j|�t|||��tj�}�j	|�|j
��fd�}|j|��S(NcsPtjrtjjd�n�j�tjrBtjjd�n�j�dS(Nsstopping HTTPS server
sjoining HTTPS thread
(RRRR8RRfR2((R9(s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pytcleanup�s	
	(R/tssltcreate_default_contexttPurposetCLIENT_AUTHtload_cert_chainRZRtEventR`twaitt
addCleanup(tcaseRtcertfileR_RR[Rh((R9s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pytmake_https_server�s



t__main__tdescriptionsERun a test HTTPS server. By default, the current directory is served.s-ps--portttypetdefaultiQthelps(port to listen on (default: %(default)s)s-qs--quiettdestRtactiontstore_falsesbe less verboses-ss--statstuse_stats_handlert
store_truesalways return stats pages--curve-namet
curve_nametstores&curve name for EC-based Diffie-Hellmans	--cipherstcipherssallowed cipher lists--dhtdh_files!PEM file containing DH parametersts'Listening on https://localhost:{0.port}g�������?(>R(RRiRIR+R'tBaseHTTPServerRRRtSimpleHTTPServerRttestRRt
import_moduleRR)tdirnamet__file__R@RgR2tCERTFILERR%RBR]RZR/RsR
targparsetArgumentParsertparsertadd_argumenttintRRVRNt
parse_argsR=RR|RtgetcwdR0RjRkRlRRmR~tset_ecdh_curveR�tload_dh_paramsR�tset_ciphersR\R9R<Rb(((s7/usr/local/python-2.7/lib/python2.7/test/ssl_servers.pyt<module>sj	)"		

		
				
© 2025 GrazzMean