⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.24
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
crypto-policies
/
python
/
__pycache__
/
View File Name :
build-crypto-policies.cpython-39.opt-1.pyc
a � �gW � @ sx d dl Z d dlZd dlZd dlZd dlZd dlZdZdd� Zdd� Zdd� Z dd d �Z dd� Zd d� Ze dkrte� dS )� Nzreload-cmds.shc O s t | dtji|�� d S )N�file)�print�sys�stderr)�args�kwargs� r �:/usr/share/crypto-policies/python/build-crypto-policies.py�eprint s r c C s� t jdd�} | jdddd� | jdddd� | jd td dd� | jd ddd� | jdddd� | jddd� | jddd� | �� S )zParse the command lineF)�allow_abbrevz--flat� store_truez1put all the generated files in a single directory)�action�helpz--testz7compare the generated config file with the existing onez--policyZPOLICYz"generate the specified policy only)�type�metavarr z--reloadcmdszDalso save reload cmds into reload-cmds.sh script in output directoryz--strictzfail on warnings� policydirz5a directory with base policy definition files (*.pol))r � outputdirz.a target directory with generated config files)�argparse�ArgumentParser�add_argument�str� parse_args)�parserr r r r s. �� �����r c C sz | j r$tj�| j|� d|� d��}n`tj�| j|�}tj�|�srzt�|� W n" typ td|� �� Y dS 0 tj�||d �}| j �r"z^t |dd��}|�� }W d � n1 s�0 Y ||kr�td|� d|� d �� W dS W d S t� y� Y n$ t�y td|� �� Y dS 0 t d|� d|� �� t |d dd��}|�|� W d � n1 �sf0 Y t � d S )N�-z.txtz#Cannot create directory for policy F�utf-8)�encodingzConfig for z for policy z differs from the existing oneTzError reading generated file zSaving config for �w��moder )Zflat�os�path�joinr �isdir�mkdir�OSErrorr �test�open�read�FileNotFoundErrorr �write)�cmdline�policy_nameZconfig_name�configr �dirpath�fZ old_configr r r �save_config/ s<