Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.10/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.10/test/__pycache__/make_ssl_certs.cpython-310.pyc
o

�9j�$�@sdZddlZddlZddlZddlZddlTdZdZdZej	�
ej	�e��Z
		
d8dd�Zd
Zdd�Zdd�Zdd�Zedk�re�e
�eddd�\ZZedd��
Ze�e�Wd�n1sbwYedd��
Ze�e�Wd�n1s|wYed�egd��egd��edd��Ze�e�e�e�Wd�n1s�wYedd ��
Ze�e�Wd�n1s�wYe�ed!dd�\ZZed"d��Ze�e�e�e�Wd�n1s�wYedd#d$�\ZZed%d��Ze�e�e�e�Wd�n	1�swYed!d#d$�\ZZed&d��Ze�e�e�e�Wd�n	1�s?wYed'd#d(d)�\ZZed*d��Ze�e�e�e�Wd�n	1�shwYgd+�Zed,d#d-�e�d.�\ZZed/d��Ze�e�e�e�Wd�n	1�s�wYgd0�Zed1d#d-�e�d.�\ZZed2d��Ze�e�e�e�Wd�n	1�s�wYed3d#d4d5�\ZZed6d��Ze�e�e�e�Wd�n	1�s�wYe�ed7�ed�ed%�dSdS)9zOMake the custom certificate and private key files used by test_ssl
and friends.�N)�*�20180829142316Z�20371028142316Za�

    [ default ]
    base_url               = http://testca.pythontest.net/testca

    [req]
    distinguished_name     = req_distinguished_name
    prompt                 = no

    [req_distinguished_name]
    C                      = XY
    L                      = Castle Anthrax
    O                      = Python Software Foundation
    CN                     = {hostname}

    [req_x509_extensions_nosan]

    [req_x509_extensions_simple]
    subjectAltName         = @san

    [req_x509_extensions_full]
    subjectAltName         = @san
    keyUsage               = critical,keyEncipherment,digitalSignature
    extendedKeyUsage       = serverAuth,clientAuth
    basicConstraints       = critical,CA:false
    subjectKeyIdentifier   = hash
    authorityKeyIdentifier = keyid:always,issuer:always
    authorityInfoAccess    = @issuer_ocsp_info
    crlDistributionPoints  = @crl_info

    [ issuer_ocsp_info ]
    caIssuers;URI.0        = $base_url/pycacert.cer
    OCSP;URI.0             = $base_url/ocsp/

    [ crl_info ]
    URI.0                  = $base_url/revocation.crl

    [san]
    DNS.1 = {hostname}
    {extra_san}

    [dir_sect]
    C                      = XY
    L                      = Castle Anthrax
    O                      = Python Software Foundation
    CN                     = dirname example

    [princ_name]
    realm = EXP:0, GeneralString:KERBEROS.REALM
    principal_name = EXP:1, SEQUENCE:principal_seq

    [principal_seq]
    name_type = EXP:0, INTEGER:1
    name_string = EXP:1, SEQUENCE:principals

    [principals]
    princ1 = GeneralString:username

    [ ca ]
    default_ca      = CA_default

    [ CA_default ]
    dir = cadir
    database  = $dir/index.txt
    crlnumber = $dir/crl.txt
    default_md = sha256
    startdate = {startdate}
    default_startdate = {startdate}
    enddate = {enddate}
    default_enddate = {enddate}
    default_days = 7000
    default_crl_days = 7000
    certificate = pycacert.pem
    private_key = pycakey.pem
    serial    = $dir/serial
    RANDFILE  = $dir/.rand
    policy          = policy_match

    [ policy_match ]
    countryName             = match
    stateOrProvinceName     = optional
    organizationName        = match
    organizationalUnitName  = optional
    commonName              = supplied
    emailAddress            = optional

    [ policy_anything ]
    countryName   = optional
    stateOrProvinceName = optional
    localityName    = optional
    organizationName  = optional
    organizationalUnitName  = optional
    commonName    = supplied
    emailAddress    = optional


    [ v3_ca ]

    subjectKeyIdentifier=hash
    authorityKeyIdentifier=keyid:always,issuer
    basicConstraints = CA:true

    F��req_x509_extensions_full�rsa:3072cCs�td|�g}td�D]}tjdd��}|�|j�Wd�n1s%wYq|\}}	}
z�tj||tt	d�}t
|d��
}|�|�Wd�n1sOwYddd	d
dd|d
|
d|d|g
}|r�tjdd��}|�|j�|j}
Wd�n1swY|d|
g7}n|dd|	g7}tdg|�|r�dd|d|d|	dddddd|
g}tdg|�t
|	d��}|�
�}Wd�n1s�wYt
|
d��}|�
�}Wd�n1s�wY||fW|D]}t�|�q�S|D]}t�|�q�w)Nzcreating cert for �F)�delete��hostname�	extra_san�	startdate�enddate�w�req�-new�-nodesz-days�7000�-newkey�-keyout�-extensions�-config�-outz-x509�openssl�ca�-outdir�cadirz-policy�policy_anything�-batch�-infiles�r)�print�range�tempfile�NamedTemporaryFile�append�name�req_template�formatr
r�open�write�
check_call�read�os�remove)r�signr�ext�key�	tempnames�i�f�req_file�	cert_file�key_filer�args�reqfile�certr&�r;�*/usr/lib/python3.10/test/make_ssl_certs.py�
make_cert_keywsj��
��
���	
�
�
��r=rcCst�t�dS)N)�shutil�rmtree�	TMP_CADIRr;r;r;r<�	unmake_ca�srAcCst�t�ttj�dd�d��}Wd�n1swYttj�dd�d��
}|�d�Wd�n1s9wYttj�dd�d��
}|�d�Wd�n1sXwYttj�dd	�d
��
}|�d�Wd�n1swwYt�d
��p}t	j
dd
ttd�}|�|�|�
�t���J}dd|jddddddd|jddg
}tdg|�dd|jddddtddd d!d"d#|jg}tdg|�dd|jd$dd%g}tdg|�Wd�n1s�wYWd�n1s�wYtgd&��t�d'd(�dS))Nrz	index.txt�a+zcrl.txt�00zindex.txt.attrzw+zunique_subject = no�serialrzCB2D80995A69525B
z
our-ca-serverrr
rrrrrrrzpycakey.pemrz-subjzG/C=XY/L=Castle Anthrax/O=Python Software Foundation CA/CN=our-ca-serverrr�pycacert.pemrrz-keyfilez	-selfsignr�v3_carz-gencrlzrevocation.crl)r�x509�-inrEr�capath/ceff1710.0rIzcapath/b1930218.0)r-�mkdirr@r)�path�joinr*r#r$r'r(r
r�flushr&r+r>�copy)r4�trr8r;r;r<�make_ca�sX
�����


�
����rPcCsddl}t�|�|��dS)Nr)�_ssl�pprint�_test_decode_cert)rKrQr;r;r<�
print_cert�srT�__main__�	localhost�req_x509_extensions_simple)r0zssl_cert.pemr�ssl_key.pemz5password protecting ssl_key.pem in ssl_key.passwd.pem)	r�pkeyrHrXrzssl_key.passwd.pem�-aes256�-passout�
pass:somepass)	rrYrHrXr�keycert.passwd.pemrZr[r\zkeycert.pemr]rB�fakehostnamezkeycert2.pemT)r/zkeycert3.pemzkeycert4.pemz
localhost-ecczparam:secp384r1.pem)r/r1zkeycertecc.pem)	z0otherName.1 = 1.2.3.4;UTF8:some other identifierz/otherName.2 = 1.3.6.1.5.2.2;SEQUENCE:princ_namezemail.1 = user@example.orgzDNS.2 = www.example.orgzdirName.1 = dir_sectzURI.1 = https://www.python.org/zIP.1 = 127.0.0.1z
IP.2 = ::1zRID.1 = 1.2.3.4.5�allsans�
)r/rzallsans.pem)z'DNS.2 = xn--knig-5qa.idn.pythontest.netz6DNS.3 = xn--knigsgsschen-lcb0w.idna2003.pythontest.netz6DNS.4 = xn--knigsgchen-b4a3dun.idna2008.pythontest.netz,DNS.5 = xn--nxasmq6b.idna2003.pythontest.netz,DNS.6 = xn--nxasmm1c.idna2008.pythontest.net�idnsanszidnsans.pem�nosan�req_x509_extensions_nosan)r/r0z	nosan.pemz>update Lib/test/test_ssl.py and Lib/test/test_asyncio/utils.py)Frrr)�__doc__r-rRr>r#�
subprocessr
rr'rK�abspath�dirname�__file__�herer=r@rArPrT�__name__�chdirr:r1r)r4r*r!r+rrLr;r;r;r<�<module>s�g
�5,

��
��
�
�
�
�
�
�
�
��

Youez - 2016 - github.com/yon3zu
LinuXploit