__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

x[h�X���SSKrSSKrSSKrSSKJr SSKJrJrJr SSK	J
r
JrJr \R"\5rSrSrSrS\"\5-S	-r"S
S5r"SS
5rSrSrSrSrSrSr\4SjrS%Sjr"SS5rS\\4Sjr S\\4Sjr!Sr"S\S\#4Sjr$Sr%\4Sjr&S r'\4S!\\\\44S"jjr(S#r)S$r*g)&�N)�suppress)�List�Sequence�Tuple)�	lifecycle�subp�utilz/etc/ssh/sshd_config)�rsa�ecdsa�ed25519z([email protected]ecdsa-sha2-nistp256z([email protected]ecdsa-sha2-nistp384z([email protected]ecdsa-sha2-nistp521z+sk-ecdsa-sha2-nistp256-cert-v01@openssh.comz"[email protected]#[email protected][email protected] [email protected]ssh-ed25519z[email protected]ssh-rsaz[email protected][email protected]�z�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�,�\rSrSrSSjrSrSrSrg)�AuthKeyLine�DNc�@�X0lX@lXPlX lXlg�N)�base64�comment�options�keytype�source)�selfrrrrrs      �4/usr/lib/python3/dist-packages/cloudinit/ssh_util.py�__init__�AuthKeyLine.__init__Es������������c�@�UR=(a UR$r)rr�rs r�valid�AuthKeyLine.validNs���{�{�+�t�|�|�+rc��/nUR(aURUR5 UR(aURUR5 UR(aURUR5 UR(aURUR5 U(dUR
$SR
U5$�N� )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__rr r(�__static_attributes__�rrrrDs��GK��,�
"rrc�(�\rSrSrSrSrSSjrSrg)�AuthKeyLineParser�aa9
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�L�SnSnU[U5:axU(dXS;aiXnUS-[U5:�aUS-nOMXS-nUS:XaUS:XaUS-nO
US:XaU(+nUS-nU[U5:aU(aM_XS;aMiUSUnXSR5nXg4$)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.
Fr)r$�	��\rN)�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��#�c�(�l���S�V�;�-F��a��(���R����!��� � rNc��URS5nURS5(dUR5S:Xa[U5$SnUR5nU"U5upgn[UUUUUS9$![aD URU5up�UcU	nU"U
5upgnN=![a [U5ss$f=ff=f)Nz
�#�c���URSS5n[U5S:a[S[U5-5eUS[;a[SUS-5e[U5S:XaUR	S5 U$)N�zTo few fields: %srzInvalid keytype %srC)�splitr7�	TypeError�VALID_KEY_TYPESr%)r9r's  r�
parse_ssh_key�.AuthKeyLineParser.parse.<locals>.parse_ssh_key�sp���9�9�T�1�%�D��4�y�1�}�� 3�c�$�i� ?�@�@��A�w�o�-�� 4�t�A�w� >�?�?��4�y�A�~����B���Kr)rrrr)�rstrip�
startswith�striprrGr?)r�src_liner�linerIr9rrr�keyoptsr>s           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*�A3�3"C�B#�#B=�8C�<B=�=Cr/r)r*r+r,r-�__doc__r?rQr.r/rrr1r1as���&!�4(
rr1c��/n[5n/nUHwn[RRU5(aO[R
"U5R
5nUH#nURURU55 M% MwMy U$![[4a  [R"[SU5 M�f=f)NzError reading lines from %s)
r1�os�path�isfiler	�load_text_file�
splitlinesr%rQ�IOError�OSError�logexc�LOG)�fnames�lines�parser�contents�fnamerOs      r�parse_authorized_keysrc�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�A1B�,B>�=B>c��[UVs/sHo"R5(dMUPM sn5n[[U55HanXnUR5(dMUH9nURUR:XdMUnX#;dM(URU5 M; XPU'Mc UHnUR
U5 M UVs/sHn[U5PM nnUR
S5 SRU5$s snfs snf)NrC�
)	�listr �ranger7r�remover%�strr&)	�old_entries�keys�k�to_addr;r9�key�br_s	         r�update_authorized_keysrp�s���
�d�0�d��g�g�i�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���[R"U5nU(aUR(d[SU-5e[R
R
URS5U4$)Nz"Unable to get SSH info for user %rz.ssh)�pwd�getpwnam�pw_dir�RuntimeErrorrUrVr&)�username�pw_ents  r�users_ssh_inforx�sH��
�\�\�(�
#�F������?�8�L�M�M��G�G�L�L�����/��8�8rc�$�SU4SU4S4nU(dSnUR5n/nUHenUHupxURXx5nM URS5(d[RRX5nUR
U5 Mg U$)N�%h�%u)z%%�%�%h/.ssh/authorized_keys�/)rF�replacerLrUrVr&r%)	�value�homedirrv�macros�paths�renderedrV�macro�fields	         r�render_authorizedkeysfile_pathsr��s����W�o��h�/��
=�F��)���K�K�M�E��H���"�L�E��<�<��-�D�#����s�#�#��7�7�<�<��.�D��������Orc���SnU(aSn[R"U5nU(a%X`:wa US:wa[RSUUUU5 g[R"U5nX`:XaUS-nO<[R
"U5n[R"U5n	X�;aUS-nOUS-nXu-S	:Xa[RS
UUU5 gU(a"US-(a[RSUU5 gg
)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��8�rzBPath %s in %s must be accessible by user %s, check its permissions�zRPath %s in %s must not give writepermission to group or world users. Ignoring key.T)r	�	get_ownerr]�debug�get_permissions�	get_group�get_user_groups)
rv�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��	�	�
@���		
��rc�2�[U5Sn[S5SnURS5SSnSn[RR	UR
5nUGH�nUSU--
n[RR
U5(a[RSU5  g[RRU5(a[RSU5  gURU5(dXcR
:XaM�[RRU5(d�[R"U5 S	n	URn
URnURUR
5(aS
n	URn
URn[R "XiSS9 [R""XjU5 SSS5 [%XUSU5nU(aGM� g [RR
U5(d$[RR'U5(a[RS
U5 g[RRU5(dB[R("USSSS9 [R""XRUR5 [%XUSU5nU(dgg!,(df   GN=f![*[,4a.n
[R."[[1U
55 Sn
A
gSn
A
ff=f)Nr5r�r~���rCz-Invalid directory. Symlink exists in path: %sFz*Invalid directory. File exists in path: %s��r�T)�mode�exist_okz%s is not a file!�)r��ensure_dir_exists)rxrFrUrV�dirnamert�islinkr]r�rWrL�existsr	�SeLinuxGuard�pw_uid�pw_gid�makedirs�	chownbyidr��isdir�
write_filerZr[r\ri)rv�filenamer��
user_pwent�
root_pwent�directories�
parent_folder�home_folder�	directoryr��uid�gid�permissions�es              r�check_create_pathr�Gst����)�!�,�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� �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��B
�W������C��Q�� ����sR�BK�';K�#A!K�BK�K�%K�'A K�A;K�
K	�K�L�($L�Lc
��[U5up#[RRUS5nUn/n[R
"USS9 [
U5nURSS5nURSS5n	[X�RU5nSSS5 [WR!5U5Hbup�[#S
U
;SU
;UR%SR'UR55/5(dMH[)XW	S:H5nU(dM`Un O XT:wa[R+S
U5 U[-U/54$![[4a+ XFS'[R"[S	[US5 N�f=f!,(df   N�=f)N�authorized_keysT��	recursive�authorizedkeysfiler}r��yesrzhFailed extracting 'AuthorizedKeysFile' in SSH config from %r, using 'AuthorizedKeysFile' file %r insteadr{rzz{}/zAAuthorizedKeysFile has an user-specific authorized_keys, using %s)rxrUrVr&r	r��parse_ssh_config_map�getr�rtrZr[r\r]�DEF_SSHD_CFG�ziprF�anyrL�formatr�r�rc)
rv�
sshd_cfg_file�ssh_dirrw�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�	�*�=�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+�E=�	AD?�?8E:�7E=�9E:�:E=�=
Fc�t�[5n/nUH+nURUR[U5US95 M- [	U5upg[
RRU5n[R"USS9 [Xt5n	[R"XiSS9 SSS5 g!,(df   g=f)N)rTr���
preserve_mode)r1r%rQrir�rUrVr�r	r�rpr�)
rkrvrr`�key_entriesrlr��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�(�)9�G������D�A�
4�	3�	3�s�?!B)�)
B7c�4�\rSrSrSSjr\S5rSrSrg)�SshdConfigLinei�Nc�(�XlX lX0lgr)rO�_keyr�)rrOrl�vs    rr�SshdConfigLine.__init__�s���	��	��
rc�R�URcgURR5$r)r��lowerrs rrn�SshdConfigLine.key�s ���9�9����y�y��� � rc���URc[UR5$[UR5nUR(aUS[UR5--
nU$r#)r�rirOr�)rr�s  rr(�SshdConfigLine.__str__�sJ���9�9���t�y�y�>�!��D�I�I��A��z�z��S�3�t�z�z�?�*�*���Hr)r�rOr�)NN)	r*r+r,r-r�propertyrnr(r.r/rrr�r��s ���
�!��!�rr��returnc��[RRU5(d/$[[R
"U5R
55$r)rUrVrW�parse_ssh_config_linesr	rXrY�rbs r�parse_ssh_configr��s9��
�7�7�>�>�%� � ��	�!�$�"5�"5�e�"<�"G�"G�"I�J�Jrc��/nUH|nUR5nU(aURS5(aUR[U55 MLUR	SS5up4UR[X#U55 M~ U$![
a@ UR	SS5up4NB![
a [RSU5 M�f=ff=f)NrBr5�=z;sshd_config: option "%s" has no key/value pair, skipping it)rMrLr%r�rF�
ValueErrorr]r�)r_�retrOrn�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��[U5nU(d0$0nUH.nUR(dMURX#R'M0 U$r)r�rnr�)rbr_r�rOs    rr�r�sC���U�#�E���	�
�C����x�x���
�
��H�H�
���Jrrbc���[RRU5(dg[R"U5R5HnUR
SUS35(dM g g)NFzInclude z	.d/*.confT)rUrVrWr	rXrYrL)rbrOs  r�_includes_dconfr�"sV��
�7�7�>�>�%� � ���#�#�E�*�5�5�7���?�?�X�e�W�I�6�7�7��8�rc�`�[U5(a�[RRUS35(d[R
"US3SS9 [RR
US3S5n[RRU5(d[R"US5 U$)Nz.dr�)r�z50-cloud-init.confr�)	r�rUrVr�r	�
ensure_dirr&rW�ensure_filer�s r�"_ensure_cloud_init_ssh_config_filer�+s}���u����w�w�}�}��w�b�\�*�*��O�O�u�g�R�L�u�5�������w�b�\�+?�@���w�w�~�~�e�$�$����U�E�*��Lrc��[U5n[U5n[X S9nU(aB[R"USRUVs/sHn[
U5PM sn5S-SS9 [U5S:g$s snf)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.)r_�updatesreTr�r)r�r��update_ssh_config_linesr	r�r&rir7)r�rbr_�changedrOs     r�update_ssh_configr�6sq��

/�u�5�E��U�#�E�%�E�C�G�������I�I�U�3�U�T�s�4�y�U�3�4�t�;��	
�
�w�<�1����4s�A7c��[5n/n[UR5Vs/sHoDR5U4PM sn5n[	USS9H�upgUR
(dMUR
U;dM*XWR
nXn	UR
U5 URU	:Xa[RSXhU	5 MvURU5 [RSUUURU	5 X�lM� [U5[U5:walUR5HXup�X�;aMURU5 UR[SX�55 [RS[U5X�5 MZ U$s snf)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.r5)�startz$line %d: option %s already set to %sz#line %d: option %s updated %s -> %srCz line %d: option %s added with %s)�set�dictrkr��	enumeratern�addr�r]r�r%r7�itemsr�)
r_r��foundr�rl�casemapr;rOrnr�s
          rr�r�GsB��
�E�E��G��G�L�L�N�;�N�q�W�W�Y��N�N�;�<�G��U�!�,����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�F
r_c��U(dg[U5nSU5n[R"USRU5S-SSS9 g)Nc3�4# �UHupUSU3v� M g7f)r$Nr/)�.0rlr�s   r�	<genexpr>�$append_ssh_config.<locals>.<genexpr>ys���,�e�d�a�!��A�a�S�z�e�s�re�abT)�omoder�)r�r	r�r&)r_rbr�s   r�append_ssh_configr
usB����.�u�5�E�,�e�,�G��O�O�
��	�	�'��T�!���	rc�B�Sn[[R5 [R"SS/SS/S9upSSS5 SnURS	5H8nUR	U5(dMU[U5UR
S
5s $ g!,(df   N^=f)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.
rC�sshdz-Vrr5)�rcsN�OpenSSH_re�,)rr�ProcessExecutionErrorrFrLr7�find)�err�_�prefixrOs    r�get_opensshd_versionr�s���
�C�	�$�,�,�	-����F�D�>��1�v�6���
.�
�F��	�	�$����?�?�6�"�"���F��d�i�i��n�5�5� ��

.�	-�s�B�
Bc�j�Sn[5nUc[RRU5$SU;aUSUR	S5nOSU;aUSUR	S5nOUn[RRU5nU$![
[4a [RSU5 gf=f)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�pr$z Could not parse sshd version: %s)	rr�Version�from_strrr�rGr]�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	�	&B2�1B2r)+�loggingrUrr�
contextlibr�typingrrr�	cloudinitrrr	�	getLoggerr*r]r�rH�_DISABLE_USER_SSH_EXITri�DISABLE_USER_OPTSrr1rcrprxr�r�r�r�r�r�r�r�r��boolr�r�r�r�r
rrr/rr�<module>r&s9���	�
��(�(�+�+�
����!��&�� ��,����(�)�*�-0�0��"�"�:V
�V
�r
� �89��*B�JL�^5A�6�rB���.K�t�N�3�K��T�.�%9��6	��3��4���&2��"+�\?K�
�X�e�C��H�o�6�
��(Jr

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 149 B 0644
apport.cpython-313.pyc File 9.96 KB 0644
atomic_helper.cpython-313.pyc File 4.39 KB 0644
cloud.cpython-313.pyc File 4.96 KB 0644
dmi.cpython-313.pyc File 9.85 KB 0644
event.cpython-313.pyc File 2.56 KB 0644
features.cpython-313.pyc File 1.85 KB 0644
gpg.cpython-313.pyc File 9.41 KB 0644
helpers.cpython-313.pyc File 21.72 KB 0644
importer.cpython-313.pyc File 2.82 KB 0644
lifecycle.cpython-313.pyc File 10.41 KB 0644
netinfo.cpython-313.pyc File 24.76 KB 0644
performance.cpython-313.pyc File 4.42 KB 0644
persistence.cpython-313.pyc File 3.04 KB 0644
registry.cpython-313.pyc File 1.86 KB 0644
safeyaml.cpython-313.pyc File 12.13 KB 0644
settings.cpython-313.pyc File 1.25 KB 0644
signal_handler.cpython-313.pyc File 5.39 KB 0644
simpletable.cpython-313.pyc File 3.36 KB 0644
socket.cpython-313.pyc File 7.08 KB 0644
ssh_util.cpython-313.pyc File 25.03 KB 0644
stages.cpython-313.pyc File 47.25 KB 0644
subp.cpython-313.pyc File 15.1 KB 0644
temp_utils.cpython-313.pyc File 3.96 KB 0644
templater.cpython-313.pyc File 9.34 KB 0644
type_utils.cpython-313.pyc File 755 B 0644
url_helper.cpython-313.pyc File 43.18 KB 0644
user_data.cpython-313.pyc File 13.78 KB 0644
util.cpython-313.pyc File 111.33 KB 0644
version.cpython-313.pyc File 576 B 0644
warnings.cpython-313.pyc File 4.48 KB 0644
Filemanager