shell bypass 403
3
."�dp � @ s d dl mZ G dd� de�ZdS )� )�ConfigGeneratorc @ sJ e Zd ZdZddhZdddd�Zdddd d
�Zedd� �Zed
d� �Z dS )�
KRB5GeneratorZkrb5Zkerberoszcamellia256-cts-cmaczcamellia128-cts-cmac)zCAMELLIA-256-CBCzCAMELLIA-128-CBCzCAMELLIA-128-CTSzaes256-cts-hmac-sha1-96zaes256-cts-hmac-sha384-192zaes128-cts-hmac-sha1-96zaes128-cts-hmac-sha256-128)zAES-256-CBC-HMAC-SHA1zAES-256-CBC-HMAC-SHA2-384zAES-128-CBC-HMAC-SHA1zAES-128-CBC-HMAC-SHA2-256c
C s |j }d}d}|d7 }d}xX|d D ]L}xF|d D ]:}y | j|| j|d | |�}W q2 tk
rj Y q2X q2W q$W x>|d D ]2}y| j|| j| |�}W q~ tk
r� Y q~X q~W d|d kr�d |d kr�| j|d
|�}||d 7 }|jd d
kr�|d7 }|S )N� z[libdefaults]
zpermitted_enctypes = � ZmacZcipher�-zRC4-128zHMAC-MD5zarcfour-hmac-md5�
Zmin_dh_sizei zpkinit_dh_min_bits=4096
)Zenabled�append�cipher_mac_map�KeyError�
cipher_mapZintegers)�clsZpolicy�p�sepZcfg�s�j�i� r �;./usr/share/crypto-policies/python/policygenerators/krb5.py�generate_config s,
zKRB5Generator.generate_configc C s dS )NTr )r �configr r r �test_config<