403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.60
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/ibus-table/engine/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/ibus-table/engine/__pycache__/main.cpython-310.pyc
o

��aW6�	@s
ddlmZddlmZddlZddlZddlZddlZddlmZmZm	Z	ddl
Z
ddlZ
ddlm
Z
e
dd�ddlmZdd	lmZddlZddlZe
�d
�Zed�Zzeee�d���ZWneefyped�ZYnwej�e��d�Zej�e��d
�Z ej�e��d�Z!ej�e�"�d�Z#ej�e�$�d�Z%defdd�Z&e&�Z'e'j(r�ddl)Z)ddl*Z*ddl+Z+e)�,�Z-e'j.r�ddl/m0Z0ddl1m2Z2m3Z3m4Z4nddl5Z5Gdd�d�Z6de6ddfdd�Z7d$dededdfdd�Z8d%dd �Z9d%d!d"�Z:e;d#k�re:�dSdS)&�)�Any)�UnionN)�signal�SIGTERM�SIGINT)�require_version�IBusz1.0)r)�GLib�
ibus-table�IBUS_TABLE_DEBUG_LEVEL�tablesz
byo-tables�iconszibus-setup-tablez	debug.log�returnc	Cs�t��}|jdddtdddd�|jdd	d
ddd
d�|jddd
dddd�|jddd
dddd�|jddddddtdd�|jddd
d dd!d�|��S)"z Parse the command line argumentsz--tablez-t�store�db�z,Set the IME table file, default: %(default)s)�action�type�dest�default�helpz--daemonz-d�
store_true�daemonFz#Run as daemon, default: %(default)s)rrrrz--ibusz-i�ibusz+Set the IME icon file, default: %(default)sz--xmlz-x�xmlz1output the engines xml part, default: %(default)sz
--no-debugz-n�store_false�debugTzWrite log file to z, default: %(default)sz	--profilez-p�profilezlPrint profiling information into the debug log. Works only when --no-debug is not used. default: %(default)s)�argparse�ArgumentParser�add_argument�str�LOGFILE�
parse_args)�parser�r%�$/usr/share/ibus-table/engine/main.pyr#6sZ����
��r#)�getdefaultlocale)�Element�
SubElement�tostringc@sJeZdZdededdfdd�Zddd�Zdd	d
�Zddeddfdd
�Z	dS)�IMApp�dbfile�exec_by_ibusrNcCs�tdkr
t�d|�t��|_t��|_|j�	d|j
�t�|j|�|_
d|_|r2|j�dd�dStjdddd	d
ddd
�|_d}d}d}d}d}d}d}	d}
d}d}|j
jr�tj�|j
jj��dd�}d|}|j
jj�d�}|j
jj�d�}|j
jj�d�}|j
jj�d�}|j
jj�d�}	|j
jj�d�}
|j
jj�d�}|j
jj�d�}|
r�tj�t|
�}
t�|
tj�s�d}
d�t|�}
tj ||||||	|
|||
d�
}|j�!|�|j�"|j�dS)N�z IMApp.__init__(exec_by_ibus=%s)
�disconnectedFzorg.freedesktop.IBus.TablerzTable Componentz0.1.0�GPLzYuwei Yu <acevery@gmail.com>zhttp://code.google.com/p/ibus/r
)�name�description�version�license�author�homepage�
textdomainr�en�us�.db�table:r1r2�	languages�creditr5�icon�layout�symbol�{} --engine-name {})
r1�longnamer2�languager4r5r>r?r@�	setupdsis)#�DEBUG_LEVEL�LOGGERrr	�MainLoop�_IMApp__mainloopr�Bus�_IMApp__bus�connect�_IMApp__bus_destroy_cb�factory�
EngineFactory�_IMApp__factory�	destroyed�request_name�	Component�_IMApp__componentr�os�path�basename�filename�replace�ime_properties�get�join�ICON_DIR�access�F_OK�format�	SETUP_CMD�
EngineDesc�
add_engine�register_component)�selfr,r-�engine_namer1rBr2rCr=r5r>r?r@�	setup_arg�enginer%r%r&�__init__�s~

�	��
��
zIMApp.__init__cCs6tdkr	t�d�tjrt��|j��|�	�dS)Nr.zIMApp.run()
)
rErFr�_ARGSr�_PROFILE�enablerH�runrL�rdr%r%r&rl�s

z	IMApp.runcCstdkr	t�d�|��dS)Nr.z
IMApp.quit()
)rErFrrLrmr%r%r&�quit�s
z
IMApp.quit�buscCs�tdkr
t�d|�|jrdSt�d�|j��d|_|j��t	j
r^t��t
��}tjt|d�}|��|�d�|�dd�|�d	d�|�d
d�|�dd�t�d|���dSdS)
Nr.zIMApp.__bus_destroy_cb(bus=%s)
zfinalizing:)T)�stream�
cumulative�main�rM�	tabsqlite�tablezProfiling info:
%s)rErFrrP�inforO�
do_destroyrHrnrirrj�disable�io�StringIO�pstats�Stats�
strip_dirs�
sort_stats�print_stats�getvalue)rdro�stats_stream�statsr%r%r&�__bus_destroy_cb�s(



�zIMApp.__bus_destroy_cb�rN�N)
�__name__�
__module__�__qualname__r!�boolrhrlrnrrLr%r%r%r&r+�s

>
r+�ima_inscCs|��t��dSr�)rn�sys�exit)r�r%r%r&�cleanup�sr��element�levelcCs�d|d}|r=|jr|j��s|d|_|D]}t||d�|jr(|j��s-|d|_q|jr6|j��s;||_dSdS|rL|jrG|j��sN||_dSdSdS)z#Use to format xml Element pretty :)�
z    r.N)�text�strip�indent�tail)r�r��i�
subelementr%r%r&r��s

�
�
�r�c	Cs�t�t�}ttdd�|��}g}|D]}|�tj�t|��qzt�t�}ttdd�|��}|D]}|�tj�t|��q0Wn	t	yGYnwt
d�}|D]�}tj|dd�}t
|d�}t
|d�}tj�|��d	d�}d
||_d�t|j�}	t
|d�}
d|
_t�d
}|r�|��}nd}|j�d�d|g��|
_|
js�|j�d�d|�d�d
g��|
_|
js�|j�d�|
_|
js�||
_t
|d�}|j�d�}
|
r�|
�d�}t|�dkr�|d
��|_n|d
���d�d
|_t
|d�}|j�d�|_t
|d�}|j�d�|_t
|d�}|j�d�}|�rtj�t|�|_t
|d�}|j�d�|_t
|d�}|j�d�|_t
|d�}|j�d�|_t
|d�}|	|_t
|d�}d|_qNt|�t|dd��d �}t�d!�}|� d|�}t!j"j#�$|d"�%d ��d#S)$zF
    Writes the XML to describe the engine(s) to standard output.
    cS�
|�d�S�Nr:��endswith��xr%r%r&�<lambda>��
zwrite_xml.<locals>.<lambda>cSr�r�r�r�r%r%r&r�r��enginesr)�user_dbrgr1r:r;rArBrr8�.�_rCr<�,r.r4r5r>r?r@r2�setup�
icon_prop_key�	InputMode�utf8)�encodingzutf-8z
<\?.*\?>\nr�N)&rT�listdir�DB_DIR�list�filter�appendrUr[�
BYO_DB_DIR�OSErrorr(�tabsqlitedb�TabSqliteDbr)rVrXr�r_r`r'�lowerrYrZ�split�lenr�r\r�r*�decode�re�compile�subr��stdout�buffer�write�encode)�dbs�_all_dbs�_db�byo_dbs�egs�_sq_db�_engine�_namererf�	_longname�_locale�	_language�
_languages�_langs�_license�_author�_icon�_icon_basename�_layout�_symbol�_desc�_setup�_icon_prop_key�egsout�pattr%r%r&�	write_xml�s�

��





��










r�c
s tjrt�dSt��}tjrtjjtdddddddd�}t�	d�}|�
|�t�tj
�t�|�t�d	�tjrBt��rBt��tjr`t�tjtj�rQtj}nd
ttjjtj�tj�f}nd}t|tj��tt�fdd
��tt �fdd
��z��!�WdSt"y���#�YdSw)zMain programN�midnightr.�zUTF-8F)�when�interval�backupCountr��delay�utc�atTimezP%(asctime)s %(filename)s line %(lineno)d %(funcName)s %(levelname)s: %(message)sz********** STARTING **********z%s%s%src�t��Sr��r���signum�stack_frame��imar%r&r��zmain.<locals>.<lambda>cr�r�r�r�r�r%r&r��r�)$rirr��logging�NullHandlerr�handlers�TimedRotatingFileHandlerr"�	Formatter�setFormatterrF�setLevel�DEBUG�
addHandlerrvrrT�forkr�r�rr]r^r�rU�seprVr+rrrrrl�KeyboardInterruptrn)�log_handler�
log_formatterrr%r�r&rrVsT��	�


��rr�__main__)rr�)<�typingrrrTr�r�rrrrr��logging.handlers�gir�
gi.repositoryrr	r��ibus_table_location�	getLoggerrF�intrEr!�getenv�	TypeError�
ValueErrorrUr[�datar��	data_homer�r\�libr`�
cache_homer"r#rir�cProfiler{ry�Profilerjr�localer'�xml.etree.ElementTreer(r)r*rMr+r�r�r�rrr�r%r%r%r&�<module>s\

�,a

a
0
�

Youez - 2016 - github.com/yon3zu
LinuXploit