Sistem Asistanı (v1.1) / sayfalar/__pycache__/yonetim.cpython-313.pyc
yonetim.cpython-313.pyc 45 satır • 15.09 KB
�

|�.i� ���SSKJrJrJrJrJrJrJrJrJ	r	J
r
Jr SSKJ
r
 SSKJr SSKJrJrJr SSKrSSKrSSKrSSKr"SS\5rg)�)�QWidget�QVBoxLayout�QHBoxLayout�QLabel�QPushButton�QListWidget�QMessageBox�	QGroupBox�
QTabWidget�	QCheckBox�	QComboBox)�Qt)�QIcon)�SayfaBasligi�SvgIkonOlusturucu�AyarlarYoneticisiNc�f^�\rSrSrS
U4SjjrSrSSjrSrSrSr	Sr
S	rS
rSr
SrU=r$)�YonetimSayfasi�c�>^�[TT]U5 UTl[5Tl[
RRS5(aSTlO3[
RRS5(aSTlOSTl[T5n[R"SS5nUR[SU55 [5TlTRR R#TR$5 URTR5 ['5n[U5oUR)[*R,R.5 [1S5n[U5nUR[3S55 [55TlURTR65 [9S5nUR;S	5 UR<R#TR>5 URU5 URU5 TRRAU[C[RD"S55S
5 ['5n	[U	5n
[G5Tl$[3S5Tl%TRJR;S5 TRHRTRJ5 [9S
5Tl&TRLR;S5 TRLR<R#TRN5 TRLRQ5 TRHRTRL5 U
RSTRH5 [G5n[9S5o�RUS5 UR;S5 UR<R#U4Sj5 [9S5o�RUS5 U
R;S5 U
R<R#U4Sj5 URU5 URU
5 U
RSU5 U
R[3S55 [55Tl+TRVR;S5 U
RTRV5 TRRAU	[C[RX"S55S5 ['5n[U5nUR[3S55 [55Tl-URTRZ5 [9S5nUR<R#TR\5 URU5 TRRAU[C[R^"S55S5 TRa5 TRc5 g)Nz
/usr/sbin/ufwz	/sbin/ufwz#33AADD� uSistem Yönetimiu!Diğer Başlangıç Uygulamalarıu@Sistem açılışında çalışan diğer uygulamaları yönetin:u#🗑️ Seçili Uygulamayı KaldırzIbackground-color: #c0392b; color: white; font-weight: bold; padding: 8px;uBaşlangıçzDurum: Kontrol Ediliyor...z0font-size: 14pt; font-weight: bold; color: #888;u📥 UFW Kurz;background-color: #33AADD; color: white; font-weight: bold;u✅ AÇ�(z!font-weight:bold; font-size:11pt;c�&>�TRS5$)N�enable��ufw_cmd��selfs��=/home/htbiltek/Programlar/sistem asistani/sayfalar/yonetim.py�<lambda>�)YonetimSayfasi.__init__.<locals>.<lambda>=s���t�|�|�H�'=�u	⛔ KAPATc�&>�TRS5$)N�disablerrs�rr r!?s������Y�(?r"zMevcut Kurallar:z(font-family: Monospace; font-size: 10pt;z#e67e22uGüvenlik DuvarıuÇalışan Kritik Servisleru⛔ Seçili Servisi Durdurz#9b59b6�	Servisler)2�super�__init__�main_windowr�ayarlar�os�path�exists�ufw_binrr�
ayarlar_ikonu�	addWidgetrr�tabs�currentChanged�connect�tab_degistir�setAlignmentr�
AlignmentFlag�AlignTopr
rr�
list_startr�
setStyleSheet�clicked�
del_autostart�addTabr�script_ikonur�
header_ufw�lbl_ufw�btn_install_ufw�install_ufw�hide�	addLayout�setMinimumHeight�
list_rules�
anahtar_ikonu�	list_serv�stop_service�
process_ikonu�load_autostart�
load_services)r�parent�layout�icon�	tab_start�l_start�grp_apps�l_apps�btn_del�tab_sec�l_sec�h_btn�btn_on�btn_off�tab_serv�l_serv�btn_stop�	__class__s`                �rr'�YonetimSayfasi.__init__s5���
���� �!���(�*���
�7�7�>�>�/�*�*�?�D�L�
�W�W�^�^�K�
(�
(��$�,�,�d�l��T�"�� �.�.�y�"�=������&8�$�?�@��L��	��	�	� � �(�(��)9�)9�:�������#��I�	��Y�)?�w�AU�AU�VX�Vf�Vf�Vo�Vo�Ap��@�A���X�&������ b�c�d�%�-���������)��C�D�����i�j������� 2� 2�3�����!����(�#��	�	����E�*;�*H�*H��*S�$T�Vd�e��)��[��%9�U�%�-����:�;���T�\�\�=W�=W�YK�>L����!�!�$�,�,�/�*�>�:���D�<P�<P�<^�<^�`]�=^����$�$�,�,�T�-=�-=�>��@T�@T�@Y�@Y�@[����!�!�$�"6�"6�7�������9Y��
���Y�'��)@�)@��)D�f�FZ�FZ�[~�F������=�>��k�*��,D�,D�R�,H�'�J_�J_�aD�KE������ ?�@�
���������!9�5�?�?�5�;Q�
����1�2�3�%�-������)F�)F�Gq�)r�
������(��	�	����%�(9�(G�(G�	�(R�"S�Uh�i��9��{�8�'<�f����� =�>�?�$�����(8�(8����(H��;�<��h�>N�>N�>V�>V�W[�Wh�Wh�>i�����"��	�	����5�):�)H�)H��)S�#T�Va�b�����t�1�1�3r"c�L^�US:XaSSKJn URSU4Sj5 gg)N�r)�QTimer�dc�">�TRSS9$)NF)�sessiz)�	check_ufwrs�rr �,YonetimSayfasi.tab_degisti.<locals>.<lambda>Ss���4�>�>��>�+Gr")�PyQt6.QtCorer_�
singleShot)r�indexr_s`  rr3�YonetimSayfasi.tab_degistiPs#����A�:�+����c�#G�H�r"c���[RRUR5(dQURRS5 URR
S5 URR5 gURR5 SURS/n[R"USSS9nURS:Xa6URR5 URUR 5 gU(dURRS5 gg!["a=nU(d,URRS	[%U535 SnAgSnAgSnAff=f)
NuDurum: UFW Dosyası Yokz!color: #e74c3c; font-weight:bold;�pkexec�statusT��capture_output�textruDurum: Erişim Reddedildi�Hata: )r*r+r,r-r>�setTextr8r?�showrA�
subprocess�run�
returncoderD�clear�parse_ufw_output�stdout�	Exception�str)rrb�cmd�process�es     rrc�YonetimSayfasi.check_ufwUs%���w�w�~�~�d�l�l�+�+��L�L� � �!:�;�T�\�\�=W�=W�X{�=|�C�S�S�X�X�Z�\b����!�!�#�	C��T�\�\�8�4�C� �n�n�S��D�I�G��!�!�Q�&����%�%�'��)>�)>�w�~�~�)N��t�|�|�3�3�4O�P�v���	C��4�<�<�/�/�&��Q���0A�B�B�6��	C�s�A*D*�"D*�*
E1�4.E,�,E1c�n�[RRUR5(d[R
"USS5 gURSUSURS3nSSSU/n[R"US	S	S
9nURS:Xa6URR5 URUR5 gUR(aUROSn[R
"US
SU35 g![a%n[R"USSU35 SnAgSnAff=f)N�HatauUFW bulunamadı.� z && z statusrj�sh�-cTrlr�Yetki verilmedi.uİşlem Tamamlanamadırouİşlem başarısız: )r*r+r,r-r	�warningrrrsrtrDrurvrw�stderrrx�critical)r�action�full_cmdrzr{�errr|s       rr�YonetimSayfasi.ufw_cmdcs���w�w�~�~�d�l�l�+�+�[�-@�-@��v�Qa�-c�ek�	`��,�,��q����T�\�\�N�'�J�H��T�4��2�C� �n�n�S��D�I�G��!�!�Q�&����(=�(=�(?��AV�AV�W^�We�We�Af�*1�.�.����>P�#�R]�Re�Re�fj�mE�IO�PS�OT�GU�SV���_�{�3�3�D�&�DZ�[\�Z]�B^�_�_��_�s�	BD�
:D�
D4�D/�/D4c��UR5nSU;a7URRS5 URRS5 gSU;a�URRS5 URRS5 UR	S5nSnUH\nS	U;a
S
U;aSnMU(dMUR5(dM3URRUR55 M^ gSU;a7URRS5 URRS5 gURRS5 g)
N�inactiveuDurum: KAPALI 🔴z2color: #e74c3c; font-weight:bold; font-size: 14pt;�activeuDurum: AÇIK 🟢z2color: #2ecc71; font-weight:bold; font-size: 14pt;�
F�To�ActionTuDurum: Bilinmiyor ⚪)�lowerr>rpr8�split�striprD�addItem)r�out�	out_lower�lines�capture�ls      rrv�YonetimSayfasi.parse_ufw_outputms���I�I�K�	���"�D�L�L�$8�$8�9M�$N�PT�P\�P\�Pj�Pj�l`�Qa�
��
"��L�L� � �!4�5�t�|�|�7Q�7Q�SG�8H��I�I�d�O�E�u�W����1�9��Q��$����7�q�w�w�y�y�$�/�/�*A�*A�!�'�'�)�*L���9�$�d�l�l�&:�&:�;N�&O�QU�Q]�Q]�Qk�Qk�ma�Rb��,�,�&�&�'>�?r"c	�t�[R"USS5 Sn[R"SSSU/SSS9nURS	:Xa~[
RRUR5(a)[R"US
S5 UR5 g[R"USS
URS35 gUR(aUROSn[R"USSU35 g![a.n[R"USS[U535 SnAgSnAff=f)N�KurulumuPUFW kurulumu başlatılacak.
Lütfen açılan pencerede root şifrenizi giriniz.zOexport DEBIAN_FRONTEND=noninteractive; apt-get update && apt-get install ufw -yrjr�r�TrlruBaşarılızUFW kuruldu.uUyarızKurulum bitti ama 'u' dosyası hala yok.r�ruKurulum başarısız:
zKritik Hatauİşlem yürütülemedi: )r	�informationrrrsrtr*r+r,r-rcr�r�r�rxry)rrzr{�err_msgr|s     rr@�YonetimSayfasi.install_ufwzs������i�2E�	F�_��	o� �n�n�h��d�C�%@�QU�\`�a�G��!�!�Q�&��7�7�>�>�$�,�,�/�/��1H�1H��}�^l�1m�os�o}�o}�o�!�)�)�$��<O�PT�P\�P\�~�]q�:r�s�.5�n�n�G�N�N�BT�'�Va�Vj�Vj�ko�qw�|S�T[�S\�z]�W^���n�{�3�3�D�-�Kd�eh�ij�ek�dl�Im�n�n��n�s$�BC?�&C?�:C?�?
D7�	$D2�2D7c�`�URR5 [RR	S5n[RRU5(aQ[R"U5H6nURS5(dMURRU5 M8 gg)Nz~/.config/autostartz.desktop)	r7rur*r+�
expanduserr,�listdir�endswithr�)r�p�fs   rrI�YonetimSayfasi.load_autostart�sp��������R�W�W�%7�%7�8M�%N��
�7�7�>�>�!����Z�Z��]���:�:�j�)�)�4�?�?�+B�+B�1�+E�#�r"c��URR5nU(aU[R"[RRSUR
5355 UR5 gg! g=f)Nz~/.config/autostart/)r7�currentItemr*�remover+r�rnrI�r�is  rr:�YonetimSayfasi.del_autostart�sX���O�O�'�'�)������2�7�7�-�-�0D�Q�V�V�X�J�.O�P�Q�SW�Sf�Sf�Sh�
���D�s�AA8�8A<c�0�URR5 [R"SSSS9nUR	S5SSHFnUR	5(dMURRUR	5S5 MH g! g=f)Nz>systemctl list-units --type=service --state=running --no-pagerT)�shellrnr�r^i����r)rFrurr�check_outputr�r�)r�or�s   rrJ�YonetimSayfasi.load_services�sw��������	��'�'�(h�pt�{�A�A��W�W�T�]�1�R�(���7�7�9�9�d�n�n�4�4�Q�W�W�Y�q�\�B�)����s�AB� 0B�Bc��URR5nU(a9[R"SSSUR	5/5 UR5 gg)Nrj�	systemctl�stop)rFr�rrrsrnrJr�s  rrG�YonetimSayfasi.stop_service�s>���N�N�&�&�(���j�n�n�h��V�Q�V�V�X�F�G��I[�I[�I]�1r")
r)r?r=r>rDrFr7r(r0r-)N)F)�__name__�
__module__�__qualname__�__firstlineno__r'r3rcrrvr@rIr:rJrG�__static_attributes__�
__classcell__)r[s@rrrsC���?4�BI�
C�`�@�	o�F�
�
�^�^r"r)�PyQt6.QtWidgetsrrrrrrr	r
rrr
rer�PyQt6.QtGuir�gorsel_araclarrrrrrr*�shutil�sysr�r"r�<module>r�sC��?�?�?�?���M�M��	�
�
�J^�W�J^r"