[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@13.59.141.124: ~ $


���Z��@sdZddlZddlZddlZddlZddlZddlmZddlm	Z
ddlmZddl
mZddlmZmZyddlZWnek
r�dZYnXdZGdd	�d	ej�ZGd
d
�d
e�ZGdd�de�ZdS)z%Async gunicorn worker for aiohttp.web�N)�suppress)�AccessLogFormat)�base)�web�)�AccessLogger�
set_result�GunicornWebWorker�GunicornUVLoopWebWorker�GunicornTokioWebWorkercs�eZdZejZejZ�fdd�Z	�fdd�Z
dd�Zdd�Zd	d
�Z
ddd
�Zdd�Zdd�Zdd�Zedd��Zdd�Z�S)r	cs;t�j||�d|_d|_d|_d|_dS)Nr)�super�__init__�_runner�_task�	exit_code�_notify_waiter)�self�args�kw)�	__class__��
/worker.pyr
"s
			zGunicornWebWorker.__init__cs@tj�j�tj�|_tj|j�t�j�dS)N)�asyncio�get_event_loop�closeZnew_event_loop�loopZset_event_loopr�init_process)r)rrrr*szGunicornWebWorker.init_processc
Cs|jjr|jjnd}td|jd|jjd|d|j|jj��}tj	|j
|�|_|jj
|jj��|jj|j��|_tt��|jj
|j�WdQRXt|jd�r�|jj
|jj��|jj�tj|j�dS)N�loggerZkeepalive_timeout�
access_log�access_log_format�shutdown_asyncgens)�cfgZ	accesslog�logr�dictZ	keepalive�_get_valid_log_formatrrZ	AppRunnerZwsgirrZrun_until_completeZsetupZcreate_task�_runrr�	Exception�hasattrr r�sys�exitr)rrZparamsrrr�run3s 	

zGunicornWebWorker.runc�sl|jjr|j|j�nd}xO|jD]D}tj|j|d|d|jjdd�}|j�IdHq.Wt	j
�}y�x�|jr?|j�|jj
j}|jjr�||jjkr�d|_|jjd|�q�|t	j
�kr-|jt	j�kr-d|_|jjd|�q�|j�IdHq�WWntk
rUYnX|jj�IdHdS)NZssl_contextZshutdown_timeout�d�_FzMax requests, shutting down: %sz!Parent changed, shutting down: %s)r!Zis_ssl�_create_ssl_contextZsocketsrZSockSiterZgraceful_timeout�start�os�getpid�alive�notifyZserverZrequests_countZmax_requestsr"�infoZppid�getppid�_wait_next_notify�
BaseException�cleanup)r�ctx�sockZsite�pidZcntrrrr%Gs*$
	'	
zGunicornWebWorker._runcCs=|j�|jj�|_}|jjd|j|�|S)Ng�?)�_notify_waiter_donerZ
create_futurerZ
call_later)r�waiterrrrr5es
z#GunicornWebWorker._wait_next_notifyNcCsJ|dkr|j}|dk	r.t|d�||jkrFd|_dS)NT)rr)rr<rrrr;ms	
z%GunicornWebWorker._notify_waiter_donecCs�|jjtj|jtjd�|jjtj|jtjd�|jjtj|jtjd�|jjtj|j	tjd�|jjtj
|jtj
d�|jjtj|j
tjd�tjtjd�tjtj
d�dS)NF)rZadd_signal_handler�signal�SIGQUIT�handle_quit�SIGTERMZhandle_exit�SIGINT�SIGWINCHZhandle_winch�SIGUSR1Zhandle_usr1�SIGABRT�handle_abort�siginterrupt)rrrr�init_signalsvs





zGunicornWebWorker.init_signalscCs'd|_|jj|�|j�dS)NF)r1r!Z
worker_intr;)r�sig�framerrrr?�s	zGunicornWebWorker.handle_quitcCs3d|_d|_|jj|�tjd�dS)NFr)r1rr!Zworker_abortr(r))rrHrIrrrrE�s		zGunicornWebWorker.handle_abortcCs�tdkrtd��tj|j�}|j|j|j�|j|_|j	re|j
|j	�|jr~|j|j�|S)z Creates SSLContext instance for usage in asyncio.create_server.

        See ssl.SSLSocket.__init__ for more details.
        NzSSL is not supported.)
�ssl�RuntimeErrorZ
SSLContextZssl_versionZload_cert_chainZcertfileZkeyfileZ	cert_reqsZverify_modeZca_certsZload_verify_locationsZciphersZset_ciphers)r!r8rrrr-�s		z%GunicornWebWorker._create_ssl_contextcCs?||jkr|jStjd|�r7td��n|SdS)Nz%\([^\)]+\)z�Gunicorn's style options in form of `%(name)s` are not supported for the log formatting. Please use aiohttp's format specification to configure access log formatting: http://docs.aiohttp.org/en/stable/logging.html#format-specification)�DEFAULT_GUNICORN_LOG_FORMAT�DEFAULT_AIOHTTP_LOG_FORMAT�re�search�
ValueError)rZ
source_formatrrrr$�sz'GunicornWebWorker._get_valid_log_format)�__name__�
__module__�__qualname__rZ
LOG_FORMATrM�GunicornAccessLogFormat�defaultrLr
rr*r%r5r;rGr?rE�staticmethodr-r$rr)rrr	s					cs"eZdZ�fdd�Z�S)r
cs@ddl}tj�j�tj|j��t�j�dS)Nr)�uvlooprrr�set_event_loop_policy�EventLoopPolicyrr)rrW)rrrr�sz$GunicornUVLoopWebWorker.init_process)rQrRrSrrr)rrr
�scs"eZdZ�fdd�Z�S)rcs@ddl}tj�j�tj|j��t�j�dS)Nr)�tokiorrrrXrYrr)rrZ)rrrr�sz#GunicornTokioWebWorker.init_process)rQrRrSrrr)rrr�s)r	r
r)�__doc__rr/rNr=r(�
contextlibrZgunicorn.configrrTZgunicorn.workersrZaiohttprZhelpersrrrJ�ImportError�__all__ZWorkerr	r
rrrrr�<module>s(
�

Filemanager

Name Type Size Permission Actions
__init__.cpython-35.opt-1.pyc File 947 B 0644
__init__.cpython-35.pyc File 947 B 0644
abc.cpython-35.opt-1.pyc File 6.08 KB 0644
abc.cpython-35.pyc File 6.08 KB 0644
client.cpython-35.opt-1.pyc File 22.11 KB 0644
client.cpython-35.pyc File 22.11 KB 0644
client_exceptions.cpython-35.opt-1.pyc File 8.04 KB 0644
client_exceptions.cpython-35.pyc File 8.04 KB 0644
client_proto.cpython-35.opt-1.pyc File 5.01 KB 0644
client_proto.cpython-35.pyc File 5.01 KB 0644
client_reqrep.cpython-35.opt-1.pyc File 23.56 KB 0644
client_reqrep.cpython-35.pyc File 23.69 KB 0644
client_ws.cpython-35.opt-1.pyc File 8.09 KB 0644
client_ws.cpython-35.pyc File 8.09 KB 0644
connector.cpython-35.opt-1.pyc File 24.95 KB 0644
connector.cpython-35.pyc File 24.95 KB 0644
cookiejar.cpython-35.opt-1.pyc File 8.4 KB 0644
cookiejar.cpython-35.pyc File 8.4 KB 0644
formdata.cpython-35.opt-1.pyc File 4.19 KB 0644
formdata.cpython-35.pyc File 4.19 KB 0644
frozenlist.cpython-35.opt-1.pyc File 2.73 KB 0644
frozenlist.cpython-35.pyc File 2.73 KB 0644
hdrs.cpython-35.opt-1.pyc File 3.72 KB 0644
hdrs.cpython-35.pyc File 3.72 KB 0644
helpers.cpython-35.opt-1.pyc File 24.01 KB 0644
helpers.cpython-35.pyc File 24.01 KB 0644
http.cpython-35.opt-1.pyc File 1.26 KB 0644
http.cpython-35.pyc File 1.26 KB 0644
http_exceptions.cpython-35.opt-1.pyc File 3.55 KB 0644
http_exceptions.cpython-35.pyc File 3.55 KB 0644
http_parser.cpython-35.opt-1.pyc File 14.1 KB 0644
http_parser.cpython-35.pyc File 14.16 KB 0644
http_websocket.cpython-35.opt-1.pyc File 13.92 KB 0644
http_websocket.cpython-35.pyc File 14.01 KB 0644
http_writer.cpython-35.opt-1.pyc File 4.06 KB 0644
http_writer.cpython-35.pyc File 4.06 KB 0644
locks.cpython-35.opt-1.pyc File 1.39 KB 0644
locks.cpython-35.pyc File 1.39 KB 0644
log.cpython-35.opt-1.pyc File 409 B 0644
log.cpython-35.pyc File 409 B 0644
multipart.cpython-35.opt-1.pyc File 25.14 KB 0644
multipart.cpython-35.pyc File 25.59 KB 0644
payload.cpython-35.opt-1.pyc File 9.29 KB 0644
payload.cpython-35.pyc File 9.42 KB 0644
payload_streamer.cpython-35.opt-1.pyc File 2.58 KB 0644
payload_streamer.cpython-35.pyc File 2.58 KB 0644
pytest_plugin.cpython-35.opt-1.pyc File 9.22 KB 0644
pytest_plugin.cpython-35.pyc File 9.28 KB 0644
resolver.cpython-35.opt-1.pyc File 3.33 KB 0644
resolver.cpython-35.pyc File 3.33 KB 0644
signals.cpython-35.opt-1.pyc File 1.23 KB 0644
signals.cpython-35.pyc File 1.23 KB 0644
streams.cpython-35.opt-1.pyc File 16.41 KB 0644
streams.cpython-35.pyc File 16.74 KB 0644
tcp_helpers.cpython-35.opt-1.pyc File 1.37 KB 0644
tcp_helpers.cpython-35.pyc File 1.37 KB 0644
test_utils.cpython-35.opt-1.pyc File 17.71 KB 0644
test_utils.cpython-35.pyc File 17.76 KB 0644
tracing.cpython-35.opt-1.pyc File 11.2 KB 0644
tracing.cpython-35.pyc File 11.2 KB 0644
web.cpython-35.opt-1.pyc File 4.65 KB 0644
web.cpython-35.pyc File 4.65 KB 0644
web_app.cpython-35.opt-1.pyc File 9.78 KB 0644
web_app.cpython-35.pyc File 10.24 KB 0644
web_exceptions.cpython-35.opt-1.pyc File 11.98 KB 0644
web_exceptions.cpython-35.pyc File 11.98 KB 0644
web_fileresponse.cpython-35.opt-1.pyc File 5.44 KB 0644
web_fileresponse.cpython-35.pyc File 5.44 KB 0644
web_middlewares.cpython-35.opt-1.pyc File 2.63 KB 0644
web_middlewares.cpython-35.pyc File 2.63 KB 0644
web_protocol.cpython-35.opt-1.pyc File 13.36 KB 0644
web_protocol.cpython-35.pyc File 13.39 KB 0644
web_request.cpython-35.opt-1.pyc File 19.16 KB 0644
web_request.cpython-35.pyc File 19.16 KB 0644
web_response.cpython-35.opt-1.pyc File 17.11 KB 0644
web_response.cpython-35.pyc File 17.84 KB 0644
web_runner.cpython-35.opt-1.pyc File 9.55 KB 0644
web_runner.cpython-35.pyc File 9.55 KB 0644
web_server.cpython-35.opt-1.pyc File 2.04 KB 0644
web_server.cpython-35.pyc File 2.04 KB 0644
web_urldispatcher.cpython-35.opt-1.pyc File 37.12 KB 0644
web_urldispatcher.cpython-35.pyc File 38.15 KB 0644
web_ws.cpython-35.opt-1.pyc File 12.52 KB 0644
web_ws.cpython-35.pyc File 12.52 KB 0644
worker.cpython-35.opt-1.pyc File 6.4 KB 0644
worker.cpython-35.pyc File 6.4 KB 0644