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__/ssh_util.cpython-314.pyc
+
��i/Z���^RIt^RIt^RIt^RIHt^RIHtHtHt^RI	H
t
HtHt]P!]4tRtR$t^�tR]!]4,R,t!RR	4t!R
R4tRtR
tRtRtRtRt]3RltR%Rlt!RR4tRRlt RRlt!Rt"RRlt#Rt$]3Rlt%Rt&]3R R!llt'R"t(R#t)R#)&�N)�suppress)�List�Sequence�Tuple)�	lifecycle�subp�utilz/etc/ssh/sshd_configz�no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user \"$USER\" rather than the user \"$DISABLE_USER\".';echo;sleep 10;exit �"c�6a�]tRt^DtoRRltRtRtRtVtR#)�AuthKeyLineNc�B�W0nW@nWPnW nWnR#�N)�base64�comment�options�keytype�source)�selfrrrrrs&&&&&&�4/usr/lib/python3/dist-packages/cloudinit/ssh_util.py�__init__�AuthKeyLine.__init__Es������������c�B�VP;'d
VP#r)rr�rs&r�valid�AuthKeyLine.validNs���{�{�+�+�t�|�|�+rc��.pVP'dVPVP4VP'dVPVP4VP'dVPVP4VP'dVPVP4V'g
VP
#RP
V4#)� )r�appendrrrr�join)r�tokss& r�__str__�AuthKeyLine.__str__Qs������<�<�<��K�K����%��<�<�<��K�K����%��;�;�;��K�K����$��<�<�<��K�K����%���;�;���8�8�D�>�!r)rrrrr)NNNN)	�__name__�
__module__�__qualname__�__firstlineno__rrr"�__static_attributes__�__classdictcell__��
__classdict__s@rrrDs�����,�
"�
"rrc�4a�]tRt^atoRtRtRRltRtVtR#)�AuthKeyLineParsera9
AUTHORIZED_KEYS FILE FORMAT
 AuthorizedKeysFile specifies the file containing public keys for public
 key authentication; if none is specified, the default is
 ~/.ssh/authorized_keys.  Each line of the file contains one key (empty
 (because of the size of the public key encoding) up to a limit of 8 kilo-
 bytes, which permits DSA keys up to 8 kilobits and RSA keys up to 16
 kilobits.  You don't want to type them in; instead, copy the
 identity.pub or the id_rsa.pub file and edit it.

 sshd enforces a minimum RSA key modulus size for protocol 1 and protocol
 2 keys of 768 bits.

 The options (if present) consist of comma-separated option specifica-
 tions.  No spaces are permitted, except within double quotes.  The fol-
 lowing option specifications are supported (note that option keywords are
 case-insensitive):
c�Z�Rp^pV\V48dV'gW,R9djW,pV^,\V48�dV^,pM@W^,,pVR8XdVR8XdV^,pMVR8XdV'*pV^,pK�V^VpWRP4pWg3#)z�
The options (if present) consist of comma-separated option specifica-
 tions.  No spaces are permitted, except within double quotes.
 Note that option keywords are case-insensitive.
F�\r
N)r�	)�len�lstrip)r�ent�quoted�i�curc�nextcr�remains&&      r�_extract_options�"AuthKeyLineParser._extract_optionsus�����
���#�c�(�l��S�V�;�-F��6�D��1�u��C�� ���E����A��J�E��t�|������E�����#����A��A��a��(���R����!��� � rNc��VPR4pVPR4'gVP4R8Xd\V4#RpVP4pV!V4wrgp\TTTTTR7# \dKTPT4wr�T'gT	pT!T
4wrgpLF \d\T4uu#i;ii;i)z
�#�c��VPR^4p\V4^8d\R\V4,4hV^,\9d\RV^,,4h\V4^8XdVP	R4V#)NzToo few fields: %szInvalid keytype %sr=)�splitr1�	TypeError�VALID_KEY_TYPESr)r3r!s& r�
parse_ssh_key�.AuthKeyLineParser.parse.<locals>.parse_ssh_key�sp���9�9�T�1�%�D��4�y�1�}�� 4�s�4�y� @�A�A��A�w�o�-�� 4�t�A�w� >�?�?��4�y�A�~����B���Kr)rrrr)�rstrip�
startswith�striprr@r9)r�src_liner�linerBr3rrr�keyoptsr8s&&&        r�parse�AuthKeyLineParser.parse�s������v�&���?�?�3���4�:�:�<�2�#5��x�(�(�
	��j�j�l��	-�)6�s�);�&�W�g�������
�	
���
	-� $� 5� 5�c� :��W��!��
-�-:�6�-B�*��'���
-�"�8�,�,�
-��
	-�s*�A8�8(C
�!B.�.C	�C
�C	�	C
�r)	r$r%r&r'�__doc__r9rJr(r)r*s@rr-r-as�����&!�4*
�*
rr-c��.p\4p.pVFxp\PPV4'dP\P
!V4P
4pVF#pVPVPV44K%	KxKz	V# \\3d!\P!\RT4K�i;i)zError reading lines from %s)
r-�os�path�isfiler	�load_text_file�
splitlinesrrJ�IOError�OSError�logexc�LOG)�fnames�lines�parser�contents�fnamerHs&     r�parse_authorized_keysr]�s����E�
�
 �F��H���	C��w�w�~�~�e�$�$��+�+�E�2�=�=�?��!�D��O�O�F�L�L��$6�7�"�%���O����!�	C��K�K��:�E�B�	C�s�A2B�-C�?Cc�&�\VUu.uFq"P4'gKVNK	up4p\\V44FhpW,pVP4'gK#VF;pVPVP8XgK TpW#9gK*VPV4K=	WPV&Kj	VFpVP
V4K	VUu.uFp\V4NK	ppVP
R4RPV4#uupiuupi)r=�
)	�listr�ranger1r�remover�strr )	�old_entries�keys�k�to_addr5r3�key�brYs	&&       r�update_authorized_keysrj�s���
�d�0�d��g�g�i�1�1�d�0�
1�F�
�3�{�#�
$���n���y�y�{�{���A��x�x�3�:�:�%����;��M�M�!�$�
��A��%������3���)�)�[��S��V�[�E�)�
�L�L����9�9�U����11��(
*s�D	�D	�Dc���\P!V4pV'dVP'g\RV,4h\P
P
VPR4V3#)z"Unable to get SSH info for user %rz.ssh)�pwd�getpwnam�pw_dir�RuntimeErrorrOrPr )�username�pw_ents& r�users_ssh_inforr�sJ��
�\�\�(�
#�F�������?�8�L�M�M��G�G�L�L�����/��8�8rc�(�RV3RV3R3pV'gRpVP4p.pVFfpVFwrxVPWx4pK	VPR4'g \PPW4pVP
V4Kh	V#)�%h�%u�%h/.ssh/authorized_keys�/)z%%�%)r?�replacerErOrPr r)	�value�homedirrp�macros�paths�renderedrP�macro�fields	&&&      r�render_authorizedkeysfile_pathsr��s����W�o��h�/��
=�F��)���K�K�M�E��H���"�L�E��<�<��-�D�#����s�#�#��7�7�<�<��.�D��������Orc�.�RpV'dRp\P!V4pV'd)W`8wd#VR8wd\PRVVVV4R#\P!V4pW`8XdVR,pME\P
!V4p\P!V4p	W�9dV^8,pM	V^,pWu,^8Xd\PRVVV4R#V'd)V^,'d\PRVV4R#R	#)
a>Check if the file/folder in @current_path has the right permissions.

We need to check that:
1. If StrictMode is enabled, the owner is either root or the user
2. the user can access the file/folder, otherwise ssh won't use it
3. If StrictMode is enabled, no write permission is given to group
   and world users (022)
i�i��rootzXPath %s in %s must be own by user %s or by root, but instead is own by %s. Ignoring key.F�zBPath %s in %s must be accessible by user %s, check its permissionszRPath %s in %s must not give writepermission to group or world users. Ignoring key.T)r	�	get_ownerrW�debug�get_permissions�	get_group�get_user_groups)
rp�current_path�	full_path�is_file�strictmodes�minimal_permissions�owner�parent_permission�group_owner�user_groupss
&&&&&     r�check_permissionsr�s�� ���#��
�N�N�<�(�E��u�(�U�f�_��	�	�
@�����
	
���,�,�\�:�����u�$���n�n�\�2���*�*�8�4���%��5�(��
 �5�(���.�!�3��	�	�
%����	
���)�E�1�1��	�	�
@���		
��rc	��\V4^,p\R4^,pVPR4^RpRp\PP	VP
4pVEF�pVRV,,
p\PP
V4'd\PRV4R#\PPV4'd\PRV4R#VPV4'gWcP
8XdK�\PPV4'g�\P!V4;_uu_4Rp	VPp
VPpVPVP
4'dRp	VPp
VPp\P !WiR	R
7\P"!WjV4RRR4\%WVRV4pV'dEK�R#	\PP
V4'g&\PP'V4'd\PRV4R#\PPV4'gF\P(!VRR
R	R7\P"!WPVP4\%WVR	V4pV'gR#R	# +'giEL;i \*\,3d0p
\P.!\\1T
44Rp
?
R#Rp
?
ii;i)�r�rwr=z-Invalid directory. Symlink exists in path: %sFz*Invalid directory. File exists in path: %s��r�T)�mode�exist_okNz%s is not a file!�)r��ensure_dir_exists���)rrr?rOrP�dirnamern�islinkrWr�rQrE�existsr	�SeLinuxGuard�pw_uid�pw_gid�makedirs�	chownbyidr��isdir�
write_filerTrUrVrc)rp�filenamer��
user_pwent�
root_pwent�directories�
parent_folder�home_folder�	directoryr��uid�gid�permissions�es&&&           r�check_create_pathr�Isz����)�!�,�J���'��*�J�G��n�n�S�)�!�B�/���
��g�g�o�o�j�&7�&7�8��$�I��S�9�_�,�M��w�w�~�~�m�,�,��	�	�C�!����w�w�~�~�m�,�,��	�	�@�-����&�&�}�5�5� �$5�$5�5���7�7�>�>�-�0�0��&�&�}�5�5� �D�$�+�+�C�$�+�+�C�$�/�/�
�0A�0A�B�B�$��(�/�/��(�/�/���K�K�
�4�H��N�N�=�s�;�6�,���5�+��K��;��U%�X�7�7�>�>�(�#�#�r�w�w�}�}�X�'>�'>��I�I�)�8�4���w�w�~�~�h�'�'�
�O�O�H�b�u��M��N�N�8�%6�%6�
�8I�8I�J�'���$��
������K6�5�5��B
�W������C��Q�� ����st�BL	�9$L	�L	�7L	�6L	�L	�#BK5�(L	�	L	�&L	�3$L	�L	�0$L	�AL	�5L�	L	�	M	�$M�M	c
�F�\V4wr#\PPVR4pTp.p\P
!VRR7;_uu_4\
V4pVPRR4pVPRR4p	\W�PV4pRRR4\XP!4V4Fdwr�\#R	V
9R
V
9VP%RP'VP44.4'gKI\)WX	R8H4pV'gKbTpM	WT8wd\P+RV4V\-V.43# \\3d0YF^&\P!\R\T^,4L�i;i +'giL�;i)
�authorized_keysT��	recursive�authorizedkeysfilervr��yeszhFailed extracting 'AuthorizedKeysFile' in SSH config from %r, using 'AuthorizedKeysFile' file %r insteadNrurtz{}/zAAuthorizedKeysFile has an user-specific authorized_keys, using %s)rrrOrPr r	r��parse_ssh_config_map�getr�rnrTrUrVrW�DEF_SSHD_CFG�zipr?�anyrE�formatr�r�r])
rp�
sshd_cfg_file�ssh_dirrq�default_authorizedkeys_file�user_authorizedkeys_file�auth_key_fns�ssh_cfg�	key_pathsr��key_path�auth_key_fn�permissions_oks
&&           r�extract_authorized_keysr��s���&�x�0��W�"$�'�'�,�,�w�8I�"J��:���L�	
�	�	�7�d�	3�	3�	�*�=�9�G����$�&?��I�"�+�+�m�U�;�K�:��=�=�(��L�
4�0"%�Y�_�_�%6��!E������ ��� ��&�&�u�|�|�F�M�M�'B�C�
�
�
�/��{�e�';��N��~�+6�(��"F� �>��	�	�
�$�	
�	!��7�8�9����G��!�
	�9��O��K�K�����Q��

�
	��
4�	3�s+�F�AE
�
=F
�
F�F
�
F�F 	c��\4p.pVF.pVPVP\V4VR74K0	\	V4wrg\
PPV4p\P!VRR7;_uu_4\Wt4p	\P!WiRR7RRR4R# +'giR#;i))rTr���
preserve_modeN)r-rrJrcr�rOrPr�r	r�rjr�)
rerprrZ�key_entriesrfr��auth_key_entriesr��contents
&&&       r�setup_user_keysr��s���
�
 �F��K�
�����6�<�<��A���<�@�A��'>�h�&G�#�[��g�g�o�o�k�*�G�	
�	�	�7�d�	3�	3�(�)9�G������D�A�
4�	3�	3�	3�s�
$B;�;C	c�@a�]tRtRtoRRlt]R4tRtRtVt	R#)�SshdConfigLinei�Nc�*�WnW nW0nR#r)rH�_keyrz)rrHrf�vs&&&&rr�SshdConfigLine.__init__�s���	��	��
rc�V�VPfR#VPP4#r)r��lowerrs&rrh�SshdConfigLine.key�s ���9�9����y�y��� � rc���VPf\VP4#\VP4pVP'd$VR\VP4,,
pV#)Nr)r�rcrHrz)rr�s& rr"�SshdConfigLine.__str__�sL���9�9���t�y�y�>�!��D�I�I��A��z�z�z��S�3�t�z�z�?�*�*���Hr)r�rHrz)NN)
r$r%r&r'r�propertyrhr"r(r)r*s@rr�r��s(�����
�!��!��rr�c�:�V^8�dQhR\\,/#���return�rr�)r�s"r�__annotate__r��s��K�K�t�N�3�Krc��\PPV4'g.#\\P
!V4P
44#r)rOrPrQ�parse_ssh_config_linesr	rRrS�r\s&r�parse_ssh_configr��s9��
�7�7�>�>�%� � ��	�!�$�"5�"5�e�"<�"G�"G�"I�J�Jrc�:�V^8�dQhR\\,/#r�r�)r�s"rr�r��s����T�.�%9�rc��.pVF~pVP4pV'dVPR4'dVP\V44KNVP	R^4wr4TP\Y#T44K�	V# \
dBTP	R^4wr4LC \
d\PRT4K�i;ii;i)r<N�=z;sshd_config: option "%s" has no key/value pair, skipping it)rFrErr�r?�
ValueErrorrWr�)rY�retrHrh�vals&    rr�r��s���
!#�C����z�z�|���t���s�+�+��J�J�~�d�+�,��	��z�z�$��*�H�C�	�
�
�>�$�S�1�2�#�$�J���		�
��:�:�c�1�-���S���
��	�	�#���
�

��		�s*�B	�	C�B+�+!C�C�C�Cc��\V4pV'g/#/pVF/pVP'gKVPW#P&K1	V#r)r�rhrz)r\rYr�rHs&   rr�r�sE���U�#�E���	�
�C����x�x�x���
�
��H�H�
���Jrc�0�V^8�dQhR\R\/#)r�r\r�)rc�bool)r�s"rr�r�$s��
�
�3�
�4�
rc��\PPV4'g+\PPVR24'dR#\PPV4'gR#\P
!V4P
4F!pVPRVR24'gK R#	R#)�.dTFzInclude z	.d/*.conf)rOrPr�rQr	rRrSrE)r\rHs& r�_includes_dconfr�$s����7�7�>�>�%� � �R�W�W�^�^�u�g�R�L�%A�%A��
�7�7�>�>�%� � ���#�#�E�*�5�5�7���?�?�X�e�W�I�6�7�7��8�rc�l�\V4'd�\PPVR24'g\P
!VR2RR7\PP
VR2R4p\PPV4'g\P!VR4V#)r�r�)r�z50-cloud-init.confr�)	r�rOrPr�r	�
ensure_dirr rQ�ensure_filer�s&r�"_ensure_cloud_init_ssh_config_filer�1s}���u����w�w�}�}��w�b�\�*�*��O�O�u�g�R�L�u�5�������w�b�\�+?�@���w�w�~�~�e�$�$����U�E�*��Lrc��\V4p\V4p\W R7pV'dI\P!TRPVUu.uFp\
V4NK	up4R,RR7\V4^8g#uupi)z�Read fname, and update if changes are necessary.

@param updates: dictionary of desired values {Option: value}
@return: boolean indicating if an update was done.)rY�updatesr_Tr�)r�r��update_ssh_config_linesr	r�r rcr1)r�r\rY�changedrHs&&   r�update_ssh_configr�<sq��

/�u�5�E��U�#�E�%�E�C�G�������I�I�U�3�U�T�s�4�y�U�3�4�t�;��	
�
�w�<�1����4s�Bc�<�\4p.p\VP4Uu.uFqDP4V3NK	up4p\	V^R7F�wrgVP
'gKVP
V9gK,WWP
,pW,p	VP
V4VPV	8Xd\PRWhV	4K�VPV4\PRVVVPV	4W�nK�	\V4\V48wdnVP4FYwr�W�9dK
VPV4VP\RW�44\PR\V4W�4K[	V#uupi)z�Update the SSH config lines per updates.

@param lines: array of SshdConfigLine.  This array is updated in place.
@param updates: dictionary of desired values {Option: value}
@return: A list of keys in updates that were changed.)�startz$line %d: option %s already set to %sz#line %d: option %s updated %s -> %sr=z line %d: option %s added with %s)�set�dictrer��	enumeraterh�addrzrWr�rr1�itemsr�)
rYr��foundr�rf�casemapr5rHrhrzs
&&        rr�r�MsD��
�E�E��G��G�L�L�N�;�N�q�W�W�Y��N�N�;�<�G��U�!�,����x�x�x���8�8�w���(�(�#�C��L�E��I�I�c�N��z�z�U�"��	�	�:�A�E�����s�#��	�	�9����J�J���#�
�)-�,�5�z�S��\�!�!�-�-�/�J�C��|���N�N�3���L�L���C�7�8��I�I�2�C��J��
�*��N��C<s�Fc�\�V^8�dQhR\\\\3,,/#)r�rY)rrrc)r�s"rr�r�{s ��
�
�X�e�C��H�o�6�
rc��V'gR#\V4pRV4p\P!VRPV4R,RRR7R#)Nc3�4"�TFwrVRV2x�K	R#5i)rNrL)�.0rfr�s&  r�	<genexpr>�$append_ssh_config.<locals>.<genexpr>s���,�e�d�a�!��A�a�S�z�e�s�r_�abT)�omoder�)r�r	r�r )rYr\r�s&& r�append_ssh_configr{sB����.�u�5�E�,�e�,�G��O�O�
��	�	�'��T�!���	rc�`�Rp\\P4;_uu_4\P!RR.^^.R7wrRRR4RpVPR4F9pVP	V4'gKV\V4VP
R4u#	R# +'giLb;i)	z�Get the full version of the OpenSSH sshd daemon on the system.

On an ubuntu system, this would look something like:
1.2p1 Ubuntu-1ubuntu0.1

If we can't find `sshd` or parse the version number, return None.
r=�sshdz-V)�rcsN�OpenSSH_r_�,)rr�ProcessExecutionErrorr?rEr1�find)�err�_�prefixrHs    r�get_opensshd_versionr�s���
�C�	�$�,�,�	-�	-����F�D�>��1�v�6���
.�
�F��	�	�$����?�?�6�"�"���F��d�i�i��n�5�5� ��

.�	-�s�B�B-	c�t�Rp\4pVf \PPV4#RV9dVRVP	R4pMRV9dVRVP	R4pMTp\PPV4pV# \
\3d\PRT4R#i;i)z�Get the upstream version of the OpenSSH sshd daemon on the system.

This will NOT include the portable number, so if the Ubuntu version looks
like `1.2p1 Ubuntu-1ubuntu0.1`, then this function would return
`1.2`
z9.0N�prz Could not parse sshd version: %s)	rr�Version�from_strrr�r@rW�warning)�upstream_version�full_versions  r�get_opensshd_upstream_versionr�s�����'�)�L���� � �)�)�*:�;�;�
�l��'�(@�,�*;�*;�C�*@�A��	��	�'�(@�,�*;�*;�C�*@�A��'��J�$�,�,�5�5�6F�G������	�"�J����6�8H�I�J�s�+ B�'B7�6B7)�rsa�ecdsa�ed25519z(ecdsa-sha2-nistp256-cert-v01@openssh.comzecdsa-sha2-nistp256z(ecdsa-sha2-nistp384-cert-v01@openssh.comzecdsa-sha2-nistp384z(ecdsa-sha2-nistp521-cert-v01@openssh.comzecdsa-sha2-nistp521z+sk-ecdsa-sha2-nistp256-cert-v01@openssh.comz"sk-ecdsa-sha2-nistp256@openssh.comz#sk-ssh-ed25519-cert-v01@openssh.comzsk-ssh-ed25519@openssh.comz ssh-ed25519-cert-v01@openssh.comzssh-ed25519zssh-rsa-cert-v01@openssh.comzssh-rsazssh-xmss-cert-v01@openssh.comzssh-xmss@openssh.comr)*�loggingrOrl�
contextlibr�typingrrr�	cloudinitrrr	�	getLoggerr$rWr�rA�_DISABLE_USER_SSH_EXITrc�DISABLE_USER_OPTSrr-r]rjrrr�r�r�r�r�r�r�r�r�r�r�r�r�rrrrLrr�<module>r*s����	�
��(�(�+�+�
����!��&�� ��,����(�)�*�-0�0��"�"�:X
�X
�v
� �89��*B�JL�^5A�6�rB���.K��6	�
��&2��"+�\?K�
��(Jr

Youez - 2016 - github.com/yon3zu
LinuXploit