%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/samba/gp/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/samba/gp/__pycache__/gp_firefox_ext.cpython-312.pyc

�

�I�d2��f�ddlZddlZddlmZddlmZddlmZddlm	Z	d�Z
d�ZGd�d	e�Zy)
�N)�
gp_pol_ext)�misc)�
get_string)�logc�<�|jtjk(r:t|j�jdd�}t
j|�S|jtjk(r|jdvr|jdk(S|jS)N��)r�r
)	�typer�REG_MULTI_SZr�data�replace�json�loads�	REG_DWORD)�er
s  �9/usr/lib/python3/dist-packages/samba/gp/gp_firefox_ext.py�parse_entry_datarsp���v�v��"�"�"��!�&�&�!�)�)�&�"�5���z�z�$���	
���4�>�>�	!�a�f�f��&6��v�v��{���6�6�M�c�`�|d}i}|D�]�}|jj|�s� d|jvr�/|jj|d�j	d�}|�r*|jd�}|}d}|dj
�rdj|dd�}	nN|jj
�r
|j}	n'dj|j|jg�}	tt|��D�]?}
||
dk(rd||
<t}|
t|�dz
k(r5|jj
�rt}t|j�}|
t|�dz
kr-||
dzj
�rt}t||
dz�}t|�tk(r*||
|vr|tk(r	i|||
<ng|||
<|||
}��|	|vri||	<|||	j�vr@|tk(r|ji�n|jg�t|�dz
||	|<|||	|}��Bt|�tk(r|jt!|����mt!|�||j<���t!|�||j<���d|iS)	N�policiesz
**delvals.r	�\����PDFjs�PSFjsr
)�keyname�
startswith�	valuenamer�strip�split�	isnumeric�join�range�len�dict�list�intr�keys�appendr)r�section�entries�result�	index_mapr�sub_keys�current�index�name�i�ctypes            r�convert_pol_to_jsonr4 s���
�j�
!�F��I�
�06���y�y�#�#�G�,���1�;�;�&���9�9�$�$�W�b�1�7�7��=����~�~�d�+�H��G��E���|�%�%�'��y�y��#�2��/�����&�&�(��y�y���y�y�!�)�)�Q�[�[�!9�:���3�x�=�)�
>���A�;�'�)�")�H�Q�K�����H�
�a��'�A�K�K�,A�,A�,C� �E�����,�E��s�8�}�Q��&�8�A�a�C�=�+B�+B�+D� �E����1��
�.�E���=�D�(���{�'�1� �D�=�35�G�H�Q�K�0�35�G�H�Q�K�0�%�h�q�k�2�G��9�,�*,�	�$���I�d�O�$8�$8�$:�:� �D�=�#�N�N�2�.�#�N�N�2�.�14�W��a��	�$���.�%�i��o�e�&<�=�G�5
>�6�G�}��$����/��2�3�'7��':�����$�"2�1�"5�F�1�;�;��a06�b
���rc��eZdZdZdZejjed�Zejjed�Z	d�Z
d�Zd�Z	d
d�Z
d	�Zy)�gp_firefox_extz/usr/lib64/firefox/distributionz/etc/firefox/policies�
policies.jsonc��y)NzMozilla/Firefox�)�selfs r�__str__zgp_firefox_ext.__str__\s�� rc���	tj|jd��t|jd�5}tj||�tjd|j�ddd�	tj|jd��t|jd�5}tj||�tjd|j�ddd�y#1swY��xYw#t$r#tjd|j�Y��wxYw#1swYyxYw#t$r#tjd|j�YywxYw)NT)�exist_ok�wzWrote Firefox preferencesz#Failed to write Firefox preferences)�os�makedirs�$_gp_firefox_ext__firefox_installdir1�open�_gp_firefox_ext__destfile1r�dumpr�debug�PermissionError�$_gp_firefox_ext__firefox_installdir2�_gp_firefox_ext__destfile2)r:r�fs   r�set_machine_policyz!gp_firefox_ext.set_machine_policy_s&��	0��K�K��2�2�T�B��d�&�&��,�
I���	�	�(�A�&��	�	�5�t�7G�7G�H�
I�	0��K�K��2�2�T�B��d�&�&��,�
I���	�	�(�A�&��	�	�5�t�7G�7G�H�
I�
I�
I�
I���	0��I�I�;�"�.�.�
0�	0��
I�
I���	0��I�I�;�"�.�.�
0�	0�sX�7C<�7C0�0C<�97D7�07D+�'D7�0C9�5C<�<)D(�'D(�+D4�0D7�4D7�7)E#�"E#c�>�tjj|j�rVt	|jd�5}tj|�}tjd|j�ddd�|Stjj|j�rVt	|jd�5}tj|�}tjd|j�ddd�|Sdii}|S#1swYSxYw#1swYSxYw)N�rzRead Firefox preferencesr)
r?�path�existsrHrBr�loadrrErC)r:rLrs   r�get_machine_policyz!gp_firefox_ext.get_machine_policyrs���
�7�7�>�>�$�*�*�+��d�&�&��,�
H���9�9�Q�<���	�	�4�d�6F�6F�G�
H���
�W�W�^�^�D�,�,�
-��d�&�&��,�
H���9�9�Q�<���	�	�4�d�6F�6F�G�
H�
��#�B�'�H���
H����
H�
��s�6D�?6D�D�DNc���|�,||_tjj|d�|_|D]�\}}|j
j
|�t|�|vrm|t|�j�D]N\}}|jtj|��|j
jt|�|��P|j
j���|D�]}|js�d}	|j
j
|j�d}
tjj|j|
�}|j!|�}|s�x|j#�}|j
j%t|�dtj&|��t)||	|j*�}|j|�|j
j���y)Nr7�!Software\Policies\Mozilla\Firefox�MACHINE/Registry.pol)rGr?rMr"rH�gp_db�set_guid�str�itemsrJrr�delete�commit�
file_sys_pathr1�parserP�store�dumpsr4r+)
r:�deleted_gpo_list�changed_gpo_list�
policy_dir�guid�settings�	attributer�gpor*�pol_filerM�pol_confs
             r�process_group_policyz#gp_firefox_ext.process_group_policys����!�)3�D�&�!�w�w�|�|�J��H�D��.�	 �N�D�(��J�J����%��4�y�H�$�+3�C��I�+>�+D�+D�+F�<�'�I�x��+�+�D�J�J�x�,@�A��J�J�%�%�c�$�i��;�<�
�J�J����
	 �$�	$�C�� � �@���
�
�#�#�C�H�H�-�1���w�w�|�|�C�$5�$5�x�@���:�:�d�+�����2�2�4���
�
� � ��T��O�!%���H�!5�7�.�x��/7�/?�/?�A���'�'��1��
�
�!�!�#�!	$rc�R�i}d}d}|jr�tjj|j|�}|j	|�}|s|S|j
D]F}|jj|�s�|j||j�d|j��<�H|S)NrSrRr)
rZr?rMr"r[r+rrr
r)r:rd�outputrer*rMrfrs        r�rsopzgp_firefox_ext.rsop�s�����)��8������7�7�<�<�� 1� 1�8�<�D��z�z�$�'�H���
��%�%�
I���9�9�'�'��0�BC�&�&�F�q�y�y�!�+�+�>�?�
I��
r)N)�__name__�
__module__�__qualname__rArGr?rMr"rCrHr;rJrPrgrjr9rrr6r6VsV��=��3���'�'�,�,�4�o�F�K��'�'�,�,�4�o�F�K�!�0�&�)-�$�>rr6)
r?r�samba.gp.gpclassr�samba.dcerpcr�samba.commonr�samba.gp.util.loggingrrr4r6r9rr�<module>rrs2��"
��'��#�%��4 �lT�Z�Tr

Zerion Mini Shell 1.0