SILENT KILLERPanel

Current Path: > > opt > alt > python36 > lib64 > python3.6 > idlelib > __pycache__


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/alt/python36/lib64/python3.6/idlelib/__pycache__

NameTypeSizeLast ModifiedActions
__init__.cpython-36.opt-1.pyc File 509 bytes April 17 2024 17:19:40.
__init__.cpython-36.opt-2.pyc File 139 bytes April 17 2024 17:19:27.
__init__.cpython-36.pyc File 509 bytes April 17 2024 17:19:44.
__main__.cpython-36.opt-1.pyc File 270 bytes April 17 2024 17:19:40.
__main__.cpython-36.opt-2.pyc File 191 bytes April 17 2024 17:19:27.
__main__.cpython-36.pyc File 270 bytes April 17 2024 17:19:45.
_pyclbr.cpython-36.opt-1.pyc File 10427 bytes April 17 2024 17:19:40.
_pyclbr.cpython-36.opt-2.pyc File 6811 bytes April 17 2024 17:19:27.
_pyclbr.cpython-36.pyc File 10427 bytes April 17 2024 17:19:45.
autocomplete.cpython-36.opt-1.pyc File 7191 bytes April 17 2024 17:19:40.
autocomplete.cpython-36.opt-2.pyc File 5559 bytes April 17 2024 17:19:27.
autocomplete.cpython-36.pyc File 7191 bytes April 17 2024 17:19:45.
autocomplete_w.cpython-36.opt-1.pyc File 11067 bytes April 17 2024 17:19:40.
autocomplete_w.cpython-36.opt-2.pyc File 10315 bytes April 17 2024 17:19:27.
autocomplete_w.cpython-36.pyc File 11115 bytes April 17 2024 17:19:45.
autoexpand.cpython-36.opt-1.pyc File 2826 bytes April 17 2024 17:19:40.
autoexpand.cpython-36.opt-2.pyc File 2068 bytes April 17 2024 17:19:27.
autoexpand.cpython-36.pyc File 2826 bytes April 17 2024 17:19:45.
browser.cpython-36.opt-1.pyc File 9573 bytes April 17 2024 17:19:40.
browser.cpython-36.opt-2.pyc File 6987 bytes April 17 2024 17:19:27.
browser.cpython-36.pyc File 9573 bytes April 17 2024 17:19:45.
calltip.cpython-36.opt-1.pyc File 5610 bytes April 17 2024 17:19:40.
calltip.cpython-36.opt-2.pyc File 3981 bytes April 17 2024 17:19:27.
calltip.cpython-36.pyc File 5610 bytes April 17 2024 17:19:45.
calltip_w.cpython-36.opt-1.pyc File 6163 bytes April 17 2024 17:19:40.
calltip_w.cpython-36.opt-2.pyc File 5222 bytes April 17 2024 17:19:27.
calltip_w.cpython-36.pyc File 6163 bytes April 17 2024 17:19:45.
codecontext.cpython-36.opt-1.pyc File 8147 bytes April 17 2024 17:19:40.
codecontext.cpython-36.opt-2.pyc File 5157 bytes April 17 2024 17:19:27.
codecontext.cpython-36.pyc File 8182 bytes April 17 2024 17:19:44.
colorizer.cpython-36.opt-1.pyc File 8362 bytes April 17 2024 17:19:40.
colorizer.cpython-36.opt-2.pyc File 8195 bytes April 17 2024 17:19:27.
colorizer.cpython-36.pyc File 8362 bytes April 17 2024 17:19:45.
config.cpython-36.opt-1.pyc File 30507 bytes April 17 2024 17:19:40.
config.cpython-36.opt-2.pyc File 20324 bytes April 17 2024 17:19:27.
config.cpython-36.pyc File 30507 bytes April 17 2024 17:19:45.
config_key.cpython-36.opt-1.pyc File 13848 bytes April 17 2024 17:19:40.
config_key.cpython-36.opt-2.pyc File 12773 bytes April 17 2024 17:19:27.
config_key.cpython-36.pyc File 13848 bytes April 17 2024 17:19:45.
configdialog.cpython-36.opt-1.pyc File 77534 bytes April 17 2024 17:19:40.
configdialog.cpython-36.opt-2.pyc File 47761 bytes April 17 2024 17:19:27.
configdialog.cpython-36.pyc File 77534 bytes April 17 2024 17:19:45.
debugger.cpython-36.opt-1.pyc File 14219 bytes April 17 2024 17:19:40.
debugger.cpython-36.opt-2.pyc File 14060 bytes April 17 2024 17:19:27.
debugger.cpython-36.pyc File 14219 bytes April 17 2024 17:19:45.
debugger_r.cpython-36.opt-1.pyc File 13767 bytes April 17 2024 17:19:40.
debugger_r.cpython-36.opt-2.pyc File 11368 bytes April 17 2024 17:19:27.
debugger_r.cpython-36.pyc File 13893 bytes April 17 2024 17:19:45.
debugobj.cpython-36.opt-1.pyc File 5173 bytes April 17 2024 17:19:40.
debugobj.cpython-36.opt-2.pyc File 5165 bytes April 17 2024 17:19:27.
debugobj.cpython-36.pyc File 5173 bytes April 17 2024 17:19:45.
debugobj_r.cpython-36.opt-1.pyc File 2009 bytes April 17 2024 17:19:40.
debugobj_r.cpython-36.opt-2.pyc File 2001 bytes April 17 2024 17:19:27.
debugobj_r.cpython-36.pyc File 2009 bytes April 17 2024 17:19:45.
delegator.cpython-36.opt-1.pyc File 1276 bytes April 17 2024 17:19:40.
delegator.cpython-36.opt-2.pyc File 1168 bytes April 17 2024 17:19:27.
delegator.cpython-36.pyc File 1276 bytes April 17 2024 17:19:44.
dynoption.cpython-36.opt-1.pyc File 2287 bytes April 17 2024 17:19:40.
dynoption.cpython-36.opt-2.pyc File 1899 bytes April 17 2024 17:19:27.
dynoption.cpython-36.pyc File 2287 bytes April 17 2024 17:19:45.
editor.cpython-36.opt-1.pyc File 48421 bytes April 17 2024 17:19:40.
editor.cpython-36.opt-2.pyc File 46762 bytes April 17 2024 17:19:27.
editor.cpython-36.pyc File 48508 bytes April 17 2024 17:19:45.
filelist.cpython-36.opt-1.pyc File 3372 bytes April 17 2024 17:19:40.
filelist.cpython-36.opt-2.pyc File 3331 bytes April 17 2024 17:19:27.
filelist.cpython-36.pyc File 3398 bytes April 17 2024 17:19:45.
grep.cpython-36.opt-1.pyc File 6753 bytes April 17 2024 17:19:40.
grep.cpython-36.opt-2.pyc File 4904 bytes April 17 2024 17:19:27.
grep.cpython-36.pyc File 6753 bytes April 17 2024 17:19:45.
help.cpython-36.opt-1.pyc File 10289 bytes April 17 2024 17:19:40.
help.cpython-36.opt-2.pyc File 7549 bytes April 17 2024 17:19:27.
help.cpython-36.pyc File 10289 bytes April 17 2024 17:19:45.
help_about.cpython-36.opt-1.pyc File 7423 bytes April 17 2024 17:19:40.
help_about.cpython-36.opt-2.pyc File 6293 bytes April 17 2024 17:19:27.
help_about.cpython-36.pyc File 7423 bytes April 17 2024 17:19:45.
history.cpython-36.opt-1.pyc File 3397 bytes April 17 2024 17:19:40.
history.cpython-36.opt-2.pyc File 2164 bytes April 17 2024 17:19:27.
history.cpython-36.pyc File 3397 bytes April 17 2024 17:19:45.
hyperparser.cpython-36.opt-1.pyc File 6778 bytes April 17 2024 17:19:40.
hyperparser.cpython-36.opt-2.pyc File 5463 bytes April 17 2024 17:19:27.
hyperparser.cpython-36.pyc File 6778 bytes April 17 2024 17:19:45.
idle.cpython-36.opt-1.pyc File 335 bytes April 17 2024 17:19:40.
idle.cpython-36.opt-2.pyc File 327 bytes April 17 2024 17:19:27.
idle.cpython-36.pyc File 335 bytes April 17 2024 17:19:45.
iomenu.cpython-36.opt-1.pyc File 13772 bytes April 17 2024 17:19:40.
iomenu.cpython-36.opt-2.pyc File 13344 bytes April 17 2024 17:19:27.
iomenu.cpython-36.pyc File 13772 bytes April 17 2024 17:19:44.
macosx.cpython-36.opt-1.pyc File 7610 bytes April 17 2024 17:19:40.
macosx.cpython-36.opt-2.pyc File 5420 bytes April 17 2024 17:19:27.
macosx.cpython-36.pyc File 7610 bytes April 17 2024 17:19:44.
mainmenu.cpython-36.opt-1.pyc File 3806 bytes April 17 2024 17:19:40.
mainmenu.cpython-36.opt-2.pyc File 3327 bytes April 17 2024 17:19:27.
mainmenu.cpython-36.pyc File 3806 bytes April 17 2024 17:19:45.
multicall.cpython-36.opt-1.pyc File 15302 bytes April 17 2024 17:19:40.
multicall.cpython-36.opt-2.pyc File 12929 bytes April 17 2024 17:19:27.
multicall.cpython-36.pyc File 15359 bytes April 17 2024 17:19:45.
outwin.cpython-36.opt-1.pyc File 6120 bytes April 17 2024 17:19:40.
outwin.cpython-36.opt-2.pyc File 4428 bytes April 17 2024 17:19:27.
outwin.cpython-36.pyc File 6120 bytes April 17 2024 17:19:44.
paragraph.cpython-36.opt-1.pyc File 5940 bytes April 17 2024 17:19:40.
paragraph.cpython-36.opt-2.pyc File 4049 bytes April 17 2024 17:19:27.
paragraph.cpython-36.pyc File 5940 bytes April 17 2024 17:19:45.
parenmatch.cpython-36.opt-1.pyc File 6382 bytes April 17 2024 17:19:40.
parenmatch.cpython-36.opt-2.pyc File 4828 bytes April 17 2024 17:19:27.
parenmatch.cpython-36.pyc File 6382 bytes April 17 2024 17:19:45.
pathbrowser.cpython-36.opt-1.pyc File 3744 bytes April 17 2024 17:19:40.
pathbrowser.cpython-36.opt-2.pyc File 3595 bytes April 17 2024 17:19:27.
pathbrowser.cpython-36.pyc File 3744 bytes April 17 2024 17:19:45.
percolator.cpython-36.opt-1.pyc File 3512 bytes April 17 2024 17:19:40.
percolator.cpython-36.opt-2.pyc File 3504 bytes April 17 2024 17:19:27.
percolator.cpython-36.pyc File 3650 bytes April 17 2024 17:19:45.
pyparse.cpython-36.opt-1.pyc File 11674 bytes April 17 2024 17:19:40.
pyparse.cpython-36.opt-2.pyc File 8086 bytes April 17 2024 17:19:27.
pyparse.cpython-36.pyc File 12037 bytes April 17 2024 17:19:45.
pyshell.cpython-36.opt-1.pyc File 42727 bytes April 17 2024 17:19:40.
pyshell.cpython-36.opt-2.pyc File 40177 bytes April 17 2024 17:19:27.
pyshell.cpython-36.pyc File 42850 bytes April 17 2024 17:19:45.
query.cpython-36.opt-1.pyc File 10433 bytes April 17 2024 17:19:40.
query.cpython-36.opt-2.pyc File 8301 bytes April 17 2024 17:19:27.
query.cpython-36.pyc File 10433 bytes April 17 2024 17:19:45.
redirector.cpython-36.opt-1.pyc File 6759 bytes April 17 2024 17:19:40.
redirector.cpython-36.opt-2.pyc File 3319 bytes April 17 2024 17:19:27.
redirector.cpython-36.pyc File 6759 bytes April 17 2024 17:19:45.
replace.cpython-36.opt-1.pyc File 7083 bytes April 17 2024 17:19:40.
replace.cpython-36.opt-2.pyc File 6425 bytes April 17 2024 17:19:27.
replace.cpython-36.pyc File 7083 bytes April 17 2024 17:19:45.
rpc.cpython-36.opt-1.pyc File 19558 bytes April 17 2024 17:19:40.
rpc.cpython-36.opt-2.pyc File 16004 bytes April 17 2024 17:19:27.
rpc.cpython-36.pyc File 19645 bytes April 17 2024 17:19:45.
rstrip.cpython-36.opt-1.pyc File 1076 bytes April 17 2024 17:19:40.
rstrip.cpython-36.opt-2.pyc File 990 bytes April 17 2024 17:19:27.
rstrip.cpython-36.pyc File 1076 bytes April 17 2024 17:19:45.
run.cpython-36.opt-1.pyc File 15345 bytes April 17 2024 17:19:40.
run.cpython-36.opt-2.pyc File 13316 bytes April 17 2024 17:19:27.
run.cpython-36.pyc File 15388 bytes April 17 2024 17:19:45.
runscript.cpython-36.opt-1.pyc File 6478 bytes April 17 2024 17:19:40.
runscript.cpython-36.opt-2.pyc File 5269 bytes April 17 2024 17:19:27.
runscript.cpython-36.pyc File 6478 bytes April 17 2024 17:19:44.
scrolledlist.cpython-36.opt-1.pyc File 5385 bytes April 17 2024 17:19:40.
scrolledlist.cpython-36.opt-2.pyc File 5377 bytes April 17 2024 17:19:27.
scrolledlist.cpython-36.pyc File 5385 bytes April 17 2024 17:19:45.
search.cpython-36.opt-1.pyc File 3541 bytes April 17 2024 17:19:40.
search.cpython-36.opt-2.pyc File 3281 bytes April 17 2024 17:19:27.
search.cpython-36.pyc File 3541 bytes April 17 2024 17:19:45.
searchbase.cpython-36.opt-1.pyc File 7977 bytes April 17 2024 17:19:40.
searchbase.cpython-36.opt-2.pyc File 5209 bytes April 17 2024 17:19:27.
searchbase.cpython-36.pyc File 7977 bytes April 17 2024 17:19:45.
searchengine.cpython-36.opt-1.pyc File 6840 bytes April 17 2024 17:19:40.
searchengine.cpython-36.opt-2.pyc File 5182 bytes April 17 2024 17:19:27.
searchengine.cpython-36.pyc File 6840 bytes April 17 2024 17:19:44.
squeezer.cpython-36.opt-1.pyc File 9907 bytes April 17 2024 17:19:40.
squeezer.cpython-36.opt-2.pyc File 6713 bytes April 17 2024 17:19:27.
squeezer.cpython-36.pyc File 9944 bytes April 17 2024 17:19:45.
stackviewer.cpython-36.opt-1.pyc File 5055 bytes April 17 2024 17:19:40.
stackviewer.cpython-36.opt-2.pyc File 5047 bytes April 17 2024 17:19:27.
stackviewer.cpython-36.pyc File 5055 bytes April 17 2024 17:19:44.
statusbar.cpython-36.opt-1.pyc File 1945 bytes April 17 2024 17:19:40.
statusbar.cpython-36.opt-2.pyc File 1937 bytes April 17 2024 17:19:27.
statusbar.cpython-36.pyc File 1945 bytes April 17 2024 17:19:45.
textview.cpython-36.opt-1.pyc File 6437 bytes April 17 2024 17:19:40.
textview.cpython-36.opt-2.pyc File 4856 bytes April 17 2024 17:19:27.
textview.cpython-36.pyc File 6437 bytes April 17 2024 17:19:45.
tooltip.cpython-36.opt-1.pyc File 6566 bytes April 17 2024 17:19:40.
tooltip.cpython-36.opt-2.pyc File 4936 bytes April 17 2024 17:19:27.
tooltip.cpython-36.pyc File 6566 bytes April 17 2024 17:19:45.
tree.cpython-36.opt-1.pyc File 14276 bytes April 17 2024 17:19:40.
tree.cpython-36.opt-2.pyc File 13495 bytes April 17 2024 17:19:27.
tree.cpython-36.pyc File 14276 bytes April 17 2024 17:19:45.
undo.cpython-36.opt-1.pyc File 10780 bytes April 17 2024 17:19:40.
undo.cpython-36.opt-2.pyc File 10772 bytes April 17 2024 17:19:27.
undo.cpython-36.pyc File 10780 bytes April 17 2024 17:19:44.
window.cpython-36.opt-1.pyc File 3156 bytes April 17 2024 17:19:40.
window.cpython-36.opt-2.pyc File 3148 bytes April 17 2024 17:19:27.
window.cpython-36.pyc File 3156 bytes April 17 2024 17:19:45.
zoomheight.cpython-36.opt-1.pyc File 1402 bytes April 17 2024 17:19:40.
zoomheight.cpython-36.opt-2.pyc File 1345 bytes April 17 2024 17:19:27.
zoomheight.cpython-36.pyc File 1402 bytes April 17 2024 17:19:45.
zzdummy.cpython-36.opt-1.pyc File 1206 bytes April 17 2024 17:19:40.
zzdummy.cpython-36.opt-2.pyc File 1130 bytes April 17 2024 17:19:27.
zzdummy.cpython-36.pyc File 1206 bytes April 17 2024 17:19:45.

Reading File: //opt/alt/python36/lib64/python3.6/idlelib/__pycache__/rpc.cpython-36.opt-1.pyc

3

� f�R�@s�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZdd�Zdd�Zd+dd�ZGd	d
�d
ej�Zd,Zd
ZGdd�de
j�ZiZejd�Zejd�ZGdd�de�ZGdd�de�Zdd�Z Gdd�de�Z!Gdd�de
j"e�Z#Gdd�de�Z$Gdd�de�Z%dd�Z&d d!�Z'Gd"d#�d#e�Z(d$d%�Z)e*d&k�r�dd'l+m,Z,e,d(d)d*�dS)-aRPC Implementation, originally written for the Python Idle IDE

For security reasons, GvR requested that Idle's Python execution server process
connect to the Idle process, which listens for the connection.  Since Idle has
only one client per server, this was not a limitation.

   +---------------------------------+ +-------------+
   | socketserver.BaseRequestHandler | | SocketIO    |
   +---------------------------------+ +-------------+
                   ^                   | register()  |
                   |                   | unregister()|
                   |                   +-------------+
                   |                      ^  ^
                   |                      |  |
                   | + -------------------+  |
                   | |                       |
   +-------------------------+        +-----------------+
   | RPCHandler              |        | RPCClient       |
   | [attribute of RPCServer]|        |                 |
   +-------------------------+        +-----------------+

The RPCServer handler class is expected to provide register/unregister methods.
RPCHandler inherits the mix-in class SocketIO, which provides these methods.

See the Idle run.main() docstring for further information on how this was
accomplished in Idle.

�NcCstj|�}|S)z*Return code object from marshal string ms.)�marshal�loads)�ms�co�r�0/opt/alt/python36/lib64/python3.6/idlelib/rpc.py�
unpickle_code-s
rcCstj|�}t|ffS)zBReturn unpickle function and tuple with marshalled co code object.)r�dumpsr)rrrrr�pickle_code3s
r
cCs$tj�}t||�}|j|�|j�S)z.Return pickled (or marshalled) string for obj.)�io�BytesIO�CodePickler�dump�getvalue)�objZprotocol�f�prrrr	9s

r	c@s"eZdZejeiZejej�dS)r
N)	�__name__�
__module__�__qualname__�types�CodeTyper
�dispatch_table�update�copyregrrrrr
Bs
r
�iz	127.0.0.1c@s6eZdZddd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
�	RPCServerNcCs |dkrt}tjj|||�dS)N)�
RPCHandler�socketserver�	TCPServer�__init__)�self�addrZhandlerclassrrrr LszRPCServer.__init__cCsdS)z@Override TCPServer method, no bind() phase for connecting entityNr)r!rrr�server_bindQszRPCServer.server_bindcCs|jj|j�dS)z�Override TCPServer method, connect() instead of listen()

        Due to the reversed connection, self.server_address is actually the
        address of the Idle Client to which we are connecting.

        N)�socketZconnect�server_address)r!rrr�server_activateUszRPCServer.server_activatecCs|j|jfS)z:Override TCPServer method, return already connected socket)r$r%)r!rrr�get_request^szRPCServer.get_requestcCs�y�Wn�tk
r�Yn�tj}tddd|d�td|d�tdtj�j|d�td||d�tdt|�|d�tj	|d�td	|d�tdd|d�t
jd
�YnXdS)z�Override TCPServer method

        Error message goes to __stderr__.  No error message if exiting
        normally or socket raised EOF.  Other exceptions not handled in
        server code will cause os._exit.

        �
�-�()�filezUnhandled server exception!z
Thread: %szClient Address: z	Request: z#
*** Unrecoverable, server exiting!rN)�
SystemExit�sys�
__stderr__�print�	threading�current_thread�name�repr�	traceback�	print_exc�os�_exit)r!�requestZclient_addressZerfrrr�handle_errorbszRPCServer.handle_error)N)rrrr r#r&r'r9rrrrrJs

	rc@s�eZdZdZd;dd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+Zd,ZdZd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Z d9d:�Z!dS)<�SocketIOrNcCs@tj�|_|dk	r||_||_|dkr*t}||_i|_i|_dS)N)	r0r1�
sockthread�	debugging�sock�objecttable�objtable�	responses�cvars)r!r=r?r<rrrr �s
zSocketIO.__init__cCs |j}d|_|dk	r|j�dS)N)r=�close)r!r=rrrrB�szSocketIO.closecCstjd�dS)z!override for specific exit actionrN)r6r7)r!rrr�exithook�szSocketIO.exithookcGsR|js
dS|jdttj�j�}x|D]}|dt|�}q(Wt|tjd�dS)N� )r+)	r<�location�strr0r1r2r/r-r.)r!�args�s�arrr�debug�s
zSocketIO.debugcCs||j|<dS)N)r?)r!�oid�objectrrr�register�szSocketIO.registercCs&y|j|=Wntk
r YnXdS)N)r?�KeyError)r!rKrrr�
unregister�szSocketIO.unregistercCs�|jd|�y|\}\}}}}Wntk
r4dSX||jkrNdd|ffS|j|}|dkrvi}	t||	�d|	fS|dkr�i}
t||
�d|
fSt||�s�dd|ffSt||�}y^|d	kr�|||�}t|t�r�t	|�}d|fS|d
k�rt
j||||ff�dSdd|fSWn�tk
�r,�Yn�t
k
�rB�Ynntk
�rX�YnXtk
�r|}
zd
|
fSd}
~
Xn4d}t||||ftjd�tjtjd�dSdS)Nz
localcall:�ERROR�Bad request formatzUnknown object id: %r�__methods__�OK�__attributes__zUnsupported method name: %r�CALL�QUEUE�QUEUEDzUnsupported message type: %s�CALLEXCzU*** Internal Error: rpc.py:SocketIO.localcall()

 Object: %s 
 Method: %s 
 Args: %s
)r+�	EXCEPTION)rPrQ)rWN)rYN)rJ�	TypeErrorr?�_getmethods�_getattributes�hasattr�getattr�
isinstance�RemoteObject�	remoteref�
request_queueZputr,�KeyboardInterrupt�OSError�	Exceptionr/r-r.r4r5)r!�seqr8�howrK�
methodnamerG�kwargsr�methods�
attributes�methodZretZex�msgrrr�	localcall�sT








zSocketIO.localcallcCs(|jd||�|j||||�}|j|�S)Nzremotecall:asynccall: )rJ�	asynccall�asyncreturn)r!rKrhrGrirfrrr�
remotecall�szSocketIO.remotecallcCs(|jd||�|j||||�}|j|�S)Nzremotequeue:asyncqueue: )rJ�
asyncqueuerp)r!rKrhrGrirfrrr�remotequeue�szSocketIO.remotequeuecCs`d||||ff}|j�}tj�|jkr8tj�}||j|<|jd|||||�|j||f�|S)NrUz
asynccall:%d:)�newseqr0r1r;�	ConditionrArJ�
putmessage)r!rKrhrGrir8rf�cvarrrrro�s
zSocketIO.asynccallcCs`d||||ff}|j�}tj�|jkr8tj�}||j|<|jd|||||�|j||f�|S)NrVzasyncqueue:%d:)rtr0r1r;rurArJrv)r!rKrhrGrir8rfrwrrrrr�s
zSocketIO.asyncqueuecCs6|jd|�|j|dd�}|jd||�|j|�S)Nz#asyncreturn:%d:call getresponse(): g�������?)�waitzasyncreturn:%d:response: )rJ�getresponse�decoderesponse)r!rf�responserrrrp�szSocketIO.asyncreturncCs�|\}}|dkr|S|dkr dS|dkr6|jd�dS|dkrT|jd�|j�dS|dkrp|jd|�t|��|d	kr�|jd
|�|�t||��dS)NrSrWrYzdecoderesponse: EXCEPTION�EOFzdecoderesponse: EOFrPzdecoderesponse: Internal ERROR:rXzdecoderesponse: Call Exception:)rJ�decode_interrupthook�RuntimeError�SystemError)r!r{rg�whatrrrrz�s&

zSocketIO.decoderesponsecCst�dS)�N)�EOFError)r!rrrr}szSocketIO.decode_interrupthookcCs6y|jddd�Wntk
r0|jd�dSXdS)z�Listen on socket until I/O not ready or EOF

        pollresponse() will loop looking for seq number None, which
        never comes, and exit on EOFError.

        Ng�������?)�myseqrxzmainloop:return)ryr�rJ)r!rrr�mainloops

zSocketIO.mainloopcCs6|j||�}|dk	r2|\}}|dkr2||j|�f}|S)NrS)�_getresponse�_proxify)r!r�rxr{rgr�rrrry#szSocketIO.getresponsecCs4t|t�rt||j�St|t�r0tt|j|��S|S)N)r_�RemoteProxy�RPCProxyrK�list�mapr�)r!rrrrr�+s


zSocketIO._proxifycCs�|jd|�tj�|jkr:x�|j||�}|dk	r|SqWnb|j|}|j�x||jkrb|j�qNW|j|}|jd||f�|j|=|j|=|j	�|SdS)Nz_getresponse:myseq:z-_getresponse:%s: thread woke up: response: %s)
rJr0r1r;�pollresponserA�acquirer@rx�release)r!r�rxr{rwrrrr�3s"


zSocketIO._getresponsecCs|jd|_}|S)N�)�nextseq)r!rfrrrrtIszSocketIO.newseqcCs�|jd|d�yt|�}Wn,tjk
rJtdt|�tjd��YnXtj	dt
|��|}xnt
|�dkr�y0tjg|jgg�\}}}|jj
|dt��}Wn ttfk
r�td��YnX||d�}qbWdS)Nzputmessage:%d:rzCannot pickle:)r+z<izsocket no longer exists)rJr	�pickleZ
PicklingErrorr/r3r-r.�structZpack�len�selectr=�send�BUFSIZE�AttributeErrorrZrd)r!�messagerH�r�w�x�nrrrrvMszSocketIO.putmessage��cCs�|j�t|j�|jkr�tj|jj�ggg|�\}}}t|�dkrFdSy|jjt�}Wnt	k
rnt
�YnXt|�dkr�t
�|j|7_|j�|j�S)Nr)�_stage0r��buff�bufneedr�r=�filenoZrecvr�rdr��_stage1)r!rxr�r�r�rHrrr�
pollpacketas
zSocketIO.pollpacketcCsR|jdkrNt|j�dkrN|jdd�}|jdd�|_tjd|�d|_d|_dS)Nrr�z<i�)�bufstater�r�r�Zunpackr�)r!rHrrrr�qs
zSocketIO._stage0cCsP|jdkrLt|j�|jkrL|jd|j�}|j|jd�|_d|_d|_|SdS)Nr�r�r)r�r�r�r�)r!�packetrrrr�xszSocketIO._stage1cCs�|j|�}|dkrdSytj|�}WnVtjk
rztdtjd�tdt|�tjd�tj	tjd�tdtjd��YnX|S)Nz-----------------------)r+zcannot unpickle packet:)
r�r�rZUnpicklingErrorr/r-r.r3r4�print_stack)r!rxr�r�rrr�pollmessage�s
zSocketIO.pollmessagec
Cs`�xXytjd�}Wntjk
r(Yn X|\}}|d|ff}|j|�y|j|�}|dkr`dSWn.tk
r~|j�dStk
r�dSX|\}}|d}|j	d||f�|d	k�r|j	d|�|j
||�}|j	d||f�|dk�r|j||f�q|dkrqq||k�r|S|jj|d�}	|	dk	r|	j�||j
|<|	j�|	j�qqWdS)
aRHandle messages received on the socket.

        Some messages received may be asynchronous 'call' or 'queue' requests,
        and some may be responses for other threads.

        'call' requests are passed to self.localcall() with the expectation of
        immediate execution, during which time the socket is not serviced.

        'queue' requests are used for tasks (which may block or hang) to be
        processed in a different thread.  These requests are fed into
        request_queue by self.localcall().  Responses to queued requests are
        taken from response_queue and sent across the link with the associated
        sequence numbers.  Messages in the queues are (sequence_number,
        request/response) tuples and code using this module removing messages
        from the request_queue is responsible for returning the correct
        sequence number in the response_queue.

        pollresponse() will loop until a response message with the myseq
        sequence number is received, and will save other responses in
        self.responses and notify the owning thread.

        rrSNzpollresponse:%d:myseq:%srUrVzpollresponse:%d:localcall:call:z%pollresponse:%d:localcall:response:%s)rUrV)�response_queue�get�queueZEmptyrvr�r��
handle_EOFr�rJrnrAr�r@�notifyr�)
r!r�rxZqmsgrfr{r�Zresqrg�cvrrrr��sL





zSocketIO.pollresponsecCsZ|j�|jd�x:|jD]0}|j|}|j�d|j|<|j�|j�qW|j�dS)z+action taken upon link being closed by peerr�r|N)r|N)�EOFhookrJrAr�r@r�r�rC)r!�keyr�rrrr��s


zSocketIO.handle_EOFcCsdS)zBClasses using rpc client/server can override to augment EOF actionNr)r!rrrr��szSocketIO.EOFhook)NN)"rrrr�r rBrCrJrMrOrnrqrsrorrrprzr}r�ryr�r�rtrvr�r�r�r�r�r�r�r�r�r�rrrrr:�s>
.


I
r:c@seZdZdS)r`N)rrrrrrrr`�sr`cCst|�}|t|<t|�S)N)�idr>r�)rrKrrrra�srac@seZdZdd�ZdS)r�cCs
||_dS)N)rK)r!rKrrrr �szRemoteProxy.__init__N)rrrr rrrrr��sr�c@s,eZdZdZdZdd�Zdd�Zdd�Zd	S)
rFz#ScCs(||_tj||�tjj||||�dS)N)Zcurrent_handlerr:r r�BaseRequestHandler)r!r=r"Zsvrrrrr szRPCHandler.__init__cCs|j�dS)z(handle() method required by socketserverN)r�)r!rrr�handleszRPCHandler.handlecCs
t||�S)N)r�)r!rKrrr�get_remote_proxy	szRPCHandler.get_remote_proxyN)rrrr<rEr r�r�rrrrr�s
rc@s:eZdZdZdZdZejejfdd�Z	dd�Z
dd	�Zd
S)�	RPCClientFz#Cr�cCs*tj||�|_|jj|�|jjd�dS)Nr�)r$�listening_sockZbindZlisten)r!�addressZfamily�typerrrr szRPCClient.__init__cCsV|jj�\}}|jr$td|tjd�|dtkr>tj||�ntd|tjd�t	�dS)Nz****** Connection request from )r+rz** Invalid host: )
r��acceptr<r/r-r.�	LOCALHOSTr:r rd)r!Zworking_sockr�rrrr�szRPCClient.acceptcCs
t||�S)N)r�)r!rKrrrr�#szRPCClient.get_remote_proxyN)rrrr<rEr�r$ZAF_INETZSOCK_STREAMr r�r�rrrrr�
s
r�c@s4eZdZdZdZdd�Zdd�Zdd�Zdd	�ZdS)
r�NcCs||_||_dS)N)�sockiorK)r!r�rKrrrr ,szRPCProxy.__init__cCsp|jdkr|j�|jj|�r.t|j|j|�S|jdkr@|j�||jkrd|jj|jd|fi�}|St	|��dS)N�__getattribute__)
�_RPCProxy__methods�_RPCProxy__getmethodsr��MethodProxyr�rK�_RPCProxy__attributes�_RPCProxy__getattributesrqr�)r!r2�valuerrr�__getattr__0s



zRPCProxy.__getattr__cCs|jj|jdfi�|_dS)NrT)r�rqrKr�)r!rrrZ__getattributes>s
zRPCProxy.__getattributescCs|jj|jdfi�|_dS)NrR)r�rqrKr�)r!rrrZ__getmethodsBs
zRPCProxy.__getmethods)	rrrr�r�r r�r�r�rrrrr�'sr�cCsTx*t|�D]}t||�}t|�r
d||<q
Wt|t�rPx|jD]}t||�q>WdS)Nr�)�dirr^�callabler_r��	__bases__r[)rrjr2�attr�superrrrr[Fs

r[cCs0x*t|�D]}t||�}t|�s
d||<q
WdS)Nr�)r�r^r�)rrkr2r�rrrr\Qs
r\c@seZdZdd�Zdd�ZdS)r�cCs||_||_||_dS)N)r�rKr2)r!r�rKr2rrrr ZszMethodProxy.__init__cOs|jj|j|j||�}|S)N)r�rqrKr2)r!rGrir�rrr�__call___szMethodProxy.__call__N)rrrr r�rrrrr�Xsr�cCs~|dkrdSdt_t|�}ytjj|�Wn<tk
rfd}|j|d�}|j|d�}tjj|�YnXtjjd�|t_dS)z9Override standard display hook to use non-locale encodingN�ascii�backslashreplace�strictr()	�builtins�_r3r-�stdout�write�UnicodeEncodeError�encode�decode)r��text�encoding�bytesrrr�displayhookgsr��__main__)�mainzidlelib.idle_test.test_rpcr�)�	verbosity)Ni )-�__doc__r�rrrr6r�r�r�r$rr�r-r0r4rrr
r	ZPicklerr
r�r�rrr>ZQueuerbr�rLr:r`rar�r�rr�r�r[r\r�r�rZunittestr�rrrr�<module>sR
	2

k


SILENT KILLER Tool