Sindbad~EG File Manager
3
��g��@s�dgZddlZddlZddlmZmZeejd<ddlZddlZddl Zddl
Zddlm
Z
ddlmZddlmZdd �Zd
d�Zdd
d�ZdS)�
run_server�N)�GObject�GLibZgobject)�config)�log)� FirewallDcCs|j�dS)NT)�reload)�service�r
�/usr/lib/python3.6/server.py�sighup4srcCs|j�dS)N)�quit)�mainloopr
r
r�sigterm8srFcsxd}|rFddlm�ddl��j��j�j�d�����fdd��y�tjjj dd�tj
�}tjjt
jj|d �}t|t
jj�}tj�}tjjj|�|r�tj���ttd
�r�tj}ntj}|tjtjt|�|tjtjt|�|j�Wnvt k
�rt!j"d�YnXt#k
�r,t!j$d�Yn:t%k
�rd}zt!j$d
|j&j't(|��WYdd}~XnX|�rt|j)�dS)zI Main function for firewall server. Handles D-Bus and GLib mainloop.
Nr)�pformat�
csr�j�t�j�dkrbtd�tdt�j��x(�jD]}tt|�d�t�|��q8Wtd�tj���dS)NrzP
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
zGARBAGE OBJECTS (%d):
z
zP
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
)Zcollect�lenZgarbage�print�typer�timeout_add_seconds)�x)�gc�
gc_collect�
gc_timeoutrr
rrLszrun_server.<locals>.gc_collectT)Zset_as_default)�bus�unix_signal_addz
Stopping..z Raising SystemExit in run_serverzException %s: %s)*�pprintrr�enableZ set_debugZ
DEBUG_LEAK�dbusrZglibZ
DBusGMainLoopZ SystemBusr ZBusNamerZDBUS_INTERFACErZ DBUS_PATHrZMainLoop�slipZset_mainloopr�hasattrrZunix_signal_add_fullZ
PRIORITY_HIGH�signal�SIGHUPr�SIGTERMrZrun�KeyboardInterruptrZdebug1�
SystemExit�error� Exception� __class__�__name__�str�stop)Zdebug_gcr r�namerr�er
)rrrrrrAsB
()F)�__all__�sysr!Z
gi.repositoryrr�modulesrZdbus.serviceZdbus.mainloop.glibZ slip.dbusrZfirewallrZfirewall.core.loggerrZfirewall.server.firewalldrrrrr
r
r
r�<module>s
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists