Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/dodgy/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/dodgy/__pycache__/checks.cpython-311.pyc

�

�܋f	��n�ddlZddlZddlZddlmZddejd��ejdej��feffZddejd	��ejd
��ffddejd
��fddejd��ffZ	ddejd��fddejd��ffZ
d�Zd�Zd�Z
dS)�N)�partial�aws_secret_keyzAmazon Web Services secret keyz(\'|")[A-Za-z0-9\\\+]{40}(\'|")z(\b|_)AWS(\b|_)�diffzPossible SCM diff in codez^<<<<<<< .*$z^>>>>>>> .*$�ssh_rsa_private_keyzPossible SSH private keyz+^-{5}(BEGIN|END)\s+RSA\s+PRIVATE\s+KEY-{5}$�ssh_rsa_public_keyzPossible SSH public keyz7^ssh-rsa\s+AAAA[0-9A-Za-z+/]+[=]{0,3}\s*([^@]+@[^@]+)?$�passwordzPossible hardcoded passwordzA(\b|[A-Z0-9_]*_)PASSWORD(_[A-Z0-9_]*|\b)\s*=\s(\'|")[^\'"]+(\'|")�secretzPossible hardcoded secret keyz?(\b|[A-Z0-9_]*_)SECRET(_[A-Z0-9_]*|\b)\s*=\s(\'|")[^\'"]+(\'|")c���g}|D]w}t|��dkr|\}}}t}n|\}}}}t|ttf��s|g}|�fd�|D����r|�||f���x|S)N�c�:��g|]}|������S�)�search)�.0�regexp�lines  ��]/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/dodgy/checks.py�
<listcomp>zcheck_line.<locals>.<listcomp>@s%���;�;�;�����t�$�$�;�;�;�)�len�any�
isinstance�list�tuple�append)r�
check_list�messages�tup�key�msg�regexps�conds`       r�
check_liner"4s�����H��
(�
(���s�8�8�q�=�=� #��C��g��D�D�&)�#�C��g�t��'�D�%�=�1�1�	 ��i�G��4�;�;�;�;�7�;�;�;�<�<�	(��O�O�S�#�J�'�'�'���Orc�*�|�d��rttjd���}nttjd���}||d���5}t|�����cddd��S#1swxYwYdS)Nz.gz�rt)�mode�rzutf-8)�encoding)�endswithr�gzip�open�codecs�check_file_contents�read)�filepath�fopen�to_checks   r�
check_filer1Fs���������/���	��-�-�-������#�.�.�.��	��x�'�	*�	*�	*�4�h�"�8�=�=�?�?�3�3�4�4�4�4�4�4�4�4�4�4�4�4����4�4�4�4�4�4s�!B�B�Bc����g}t|�d����D];\�}tttfD]!}|�fd�t||��D��z
}�"�<|S)N�
c�&��g|]
\}}�dz||f��S)�r
)rrr�line_number0s   �rrz'check_file_contents.<locals>.<listcomp>Vs9�������C����!�3��,���r)�	enumerate�split�STRING_VALS�	LINE_VALS�	VAR_NAMESr")�
file_contentsrrrr6s    @rr,r,Qs�����H�'�
�(;�(;�D�(A�(A�B�B�����d�&�	�9�=�	�	�J������ *�4�� <� <����
�H�H�	��Or)r+r)�re�	functoolsr�compile�
IGNORECASE�allr9r:r;r"r1r,r
rr�<module>rBs^��
�
�
�
�����	�	�	�	�������	�(��B�J�9�:�:��B�J�)�2�=�9�9�	
�	��
��	�#�	���O�	$�	$�j�b�j��&A�&A�B��	�"���
�A�B�B��	�!���
�M�N�N��
�	�(	�%���
�P�	
�	
��	�'���
�U�V�V��

�	� ���$4�4�4�
�
�
�
�
r

Hacked By AnonymousFox1.0, Coded By AnonymousFox