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/sources/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/cloudinit/sources/__pycache__/DataSourceWSL.cpython-314.pyc
+
��i�C���Rt^RIt^RIt^RIt^RIHt^RIHtHtHt^RI	t	^RI
HtHtH
t
^RIHt^RIHt^RIHt]P(!]4tRtR	tR
tRtRtR
tRtRRltRRltRRlt RRlt!RRlt"RRlt#!RR4t$RRlt%RR lt&R!R"lt'R#R$lt(R%R&lt)!R'R(]PT4t+]+]PX33.t-R)t.R#)*z?Datasource to support the Windows Subsystem for Linux platform.N��PurePath)�List�Optional�Tuple)�sources�subp�util)�Distro)�type_from_starts_with)�Pathsz/usr/bin/wslpathziid-datasource-wsl�%s.user-dataz
agent.yaml�	landscape�client�installation_request_idc�$�V^8�dQhR\/#���return��str)�formats"�A/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceWSL.py�__annotate__r!s��
1�
1�s�
1�c��\P!\RR.4wr\VP44P#)zD
Returns the name of the current WSL instance as seen from outside.
z-am�/)r�WSLPATH_CMDr�rstrip�name)�
root_net_path�_s  r�
instance_namer"!s6���y�y�+�u�c�!:�;��M��M�(�(�*�+�0�0�0rc�:�V^8�dQhR\\,/#r�rr)rs"rrr.s��
�
�D��I�
rc���RpRp.p\P!4P4F:pVR,V8XgKWR,9gK"VPVR,4K<	V#)z�
Return a list of mount points of the Windows drives inside the current
WSL instance, if drives are mounted, or an empty list otherwise
�9pzaname=drvfs�fstype�opts�
mountpoint)r	�mounts�values�append)�FS_TYPE�OPTIONS_CONTAIN�mounted�mnts    r�mounted_win_drivesr1.sY��
�G�#�O��G��{�{�}�#�#�%���x�=�G�#��v�;�(F��N�N�3�|�,�-�&��Nrc�$�V^8�dQhR\/#rr)rs"rrr>s�����rc�@�\4pV'g\R4hRpVFYpW,p\P!V\P4'gK8\
P
RV4\V4u#	\RRPV4,4h)z7
Returns the Linux path to the Windows host's cmd.exe.
zWindows drives are not mounted.z%s/Windows/System32/cmd.exezFound cmd.exe at <%s>z,Couldn't find cmd.exe in any mount point: %sz, )	r1�IOError�os�access�X_OK�LOG�debugr�join)r*�	candidater0�cmds    r�cmd_executabler=>s���
 �
!�F���7�8�8�.�I����o���y�y��b�g�g�&�&���	�	�)�3�/���}��
��6����6�9J�J��rc�$�V^8�dQhR\/#rr)rs"rrrVs��"�"�8�"rc�6�\4p\P!RVP4RR.4wrVP4pV'g\P!R4h\P!\
RV.4wr2\
VP44#)z�
Finds the user's home directory path as a WSL path.

raises: IOError when no mountpoint with cmd.exe is found
           ProcessExecutionError when either cmd.exe is unable to retrieve
           the user's home directory
z/initz/Czecho %USERPROFILE%z4No output from cmd.exe to show the user profile dir.z-au)r=r�as_posixr�ProcessExecutionErrorrr)r<�homer!�outs    r�	find_homerDVs|���
�C��i�i��#�,�,�.�$�8L�M�N�G�D��;�;�=�D���(�(�B�
�	
��Y�Y��U�D�1�
2�F�C��C�J�J�L�!�!rc�F�V^8�dQhR\R\\,/#)r�	user_homer)rr)rs"rrrts����8����0B�rc���\PPVR4p\PPV4'g\PRV4R#\
V4#)z�
Returns the Windows user profile .cloud-init directory translated as a
Linux path accessible inside the current WSL instance, or None if not
found.
z.cloud-initz*cloud-init user data dir %s doesn't exist.N)r5�pathr:�isdirr8r9r)rF�seed_dirs& r�cloud_init_data_dirrKtsH���w�w�|�|�I�}�5�H�
�7�7�=�=��"�"��	�	�>��I���H��rc�:�V^8�dQhR\\,/#rr$)rs"rrr�s����T�#�Y�rc��\P!4wrpV'dTMTpRV,V:RV:R2RV,R.#)zs
Return a list of candidate file names that may contain user-data
in some supported format, ordered by precedence.
r
�-z
.user-dataz%s-all.user-datazdefault.user-data)r	�get_linux_distro)r"�distribution_id�
version_id�version_codename�versions&    r�candidate_user_data_file_namesrT�sI��
59�4I�4I�4K�1�O�!1�&�j�,<�G�	��&�,�g�6��_�,��	�	rc�Ha�]tRt^�toRtV3RlRltV3RlRltRtVtR#)�
ConfigDatazzModels a piece of configuration data as a dict if possible, while
retaining its raw representation alongside its file pathc� <�V^8�dQhRS[/#r��bool)r�
__classdict__s"�rr�ConfigData.__annotate__�s���,�,��,rc��VPRJ#�N)�config_dict)�selfs&r�is_cloud_config�ConfigData.is_cloud_config�s�����t�+�+rc�&<�V^8�dQhRS[RS[/#)rrH�instance_id)rr)rrZs"�rrr[�s�����X��C�rc��\P!V4VnWnRVnR\VP48Xd&\P!VP4VnVP'd�V'd�V\8wd�VPP\/4P\4e{VP\,\,P\V4pW28Xd=R\P!VP4P4,VnR#R#R#R#R#R#)Nztext/cloud-configz#cloud-config
%s)r	�load_text_file�rawrHr^r�	load_yaml�DEFAULT_INSTANCE_ID�get�LANDSCAPE_CFG_KEY�LANDSCAPE_CLIENT_CFG_KEY�
setdefault�LANDSCAPE_INSTALLATION_REQ_ID�yaml�dump�strip)r_rHrc�req_ids&&& r�__init__�ConfigData.__init__�s���+�+�D�1���"�	�+/����"7����"A�A�#�~�~�d�h�h�7�D��
������2�2�� � �$�$�%6��;�?�?�(�����%�%�&7�8�(���j�6��D�
��$�'�$�)�)�D�4D�4D�*E�*K�*K�*M�M���%��3��
r)r^rHrfN)	�__name__�
__module__�__qualname__�__firstlineno__�__doc__r`rr�__static_attributes__�__classdictcell__)rZs@rrVrV�s����@�,�,��rrVc�F�V^8�dQhR\R\\,/#)r�
metadata_pathr)rr�dict)rs"rrr�s����(��x��~�rc��Rp\P!\P!V4/R7pV# \d\PRT4T#i;i)zG
Returns the relevant metadata loaded from the supplied metadata_path.
N)�defaultz!No instance metadata found at %s.)r	rgre�FileNotFoundErrorr8r9)r|�metadatas& r�_load_metadatar��s]���H�
��>�>����
�.��
���O��
�
��	�	�/��	
�
�O�

�s�,2�!A�Ac�<�V^8�dQhR\R\R\/#)rrFr"r)rrr})rs"rrr�s!��"�"�h�"�s�"�t�"rc��R\/p\VR,4p\V4pRpW43F<pVfK	VRV,,p\V4pVfK*TpVP4pM	V'g\PR4V'dRV9d)RVRV2p	\P
V	4\V	4hV#)zz
Returns the relevant metadata loaded from either the Ubuntu Pro dir
or the user cloud-int dir based on the instance name
�instance-id�
.ubuntupro�z%s.meta-datazCUnable to find meta-data file candidates. Using default instance-idzMetadata at z5 does not contain instance-id key. Instead received: )rhrKr�r@r8r9�error�
ValueError)
rFr"r��pro_dir�user_dir�found_at�dirrH�dt�msgs
&&        r�load_instance_metadatar��s���
�2�3�H�!�)�l�":�;�G�"�9�-�H��H��"���;���n�}�4�5��
�D�
!��
�>��H��}�}��H��#���	�	�
)�	
�
�}�H�4��8�*�%"�"*��
-�	�	�	�	�#����o���Orc	��V^8�dQhR\R\R\\\,\\,3,/#)rrFrcr)rrrrrV)rs"rrr�s8��&�&��&�&)�&�
�8�J���*�!5�5�6�&rc��\VR,4pVfR#\\PP	V\
\
4,44pRp\PPV4'd,\PRV\V44\W14p\\PP	V\44pRp\PPV4'd\WQ4pWd3#)z[
Read .ubuntupro user-data if present and return a tuple of agent and
landscape user-data.
r�NzYLandscape configuration found: %s. Organization policy ignores any local user-data in %s.)NN)rKrr5rHr:�LANDSCAPE_DATA_FILEr"�isfiler8r9rV�AGENT_DATA_FILE)rFrcr��landscape_path�landscape_data�
agent_path�
agent_datas&&     r�load_ubuntu_pro_datar��s���"�)�l�":�;�G������
�����W�1�M�O�C�D��N��N�	�w�w�~�~�n�%�%��	�	�
1���	�*�		
�$�N�@���"�'�'�,�,�w��@�A�J��J�	�w�w�~�~�j�!�!��
�8�
��%�%rc�~�V^8�dQhR\\,R\\,R\\,/#)rr��	user_datar)rrVr)rs"rrrs7��R�R���$�R�19�*�1E�R�
�c�]�Rrc���VeVP'g%VeVP'gR#VP#VeVP'g%VeVP'gR#VP#\VP4VP4.4'gQ\P	R4RVP
P
4:RVP
P
4:R2#/pRp.p\VP\4'd?VPpVPR/4PR/4PRR4p\VP\4'd�V'd\P	R	4VPpVF$pWb9dVPV4WV,W&&K&	V'd%\P	R
PV44V'dPVPR/4PR4'd)\P	RV4W2R,R,R&R\P!V4P4,#)
aMerge agent.yaml data provided by Ubuntu Pro for WSL
and user data provided either by Landscape or the local user,
according to the UP4W specific rules.

When merging is not possible, provide #include directive to allow
cloud-init to merge separate parts.
NzaUnable to merge {agent_data.path} and {user_data.path}. Providing as separate user-data #include.z	#include
�
r�rr�tagsz.Merging both user_data and agent.yaml configs.z% agent.yaml overrides config keys: , zFLandscape client conf updated with user-data landscape.client.tags: %sz@#cloud-config
# WSL datasouce Merged agent.yaml and user_data
%s)rf�allr`r8r9rHr@�
isinstancer^r}rir,r:rnrorp)r�r��merged�	user_tags�overridden_keys�agent�keys&&     r�merge_agent_landscape_datar�s���	��J�N�N�N���y�}�}�}���}�}��	��9�=�=�=���
������~�~���
�*�*�,�i�.G�.G�.I�J�K�K��	�	�
8�	
�

�O�O�$�$�&��N�N�#�#�%�
�	
��F��I�(*�O��)�'�'��.�.��&�&���J�J�{�B�'�+�+�H�b�9�=�=�f�b�I�	��*�(�(�$�/�/���I�I�F�G��&�&���C��}��&�&�s�+��*�F�K����I�I����o�.�
�����K��4�8�8��B�B��I�I�-��
�
5>�;���)�&�1�	M�
�)�)�F�
�
!�
!�
#�	$�rc�$�V^8�dQhR\/#)r�fieldr)rs"rrrfs����C�rc��RVPRR4,p\P!RR.4wr#W9# \Pd-p\P	RTTP
4Rp?R#Rp?ii;i)	z�Checks if the landscape-config binary supports the intended
configuration field, returning False if not or if attempting
to run that binary fails.
z--r!rNzlandscape-configz--helpz4Unable to verify if landscape-client supports %s: %sNF)�replacerrAr8�warning�reason)r��flagrCr!�errs&    r�landscape_supports_fieldr�fsp��

��e�m�m�C��-�-�����.��9�:����{����%�%�����B���J�J�	
�
��
�s�69�A:�!A5�5A:c�|aa�]tRtRtoRtRV3RlV3RllltV3RlRltV3RlRltV3R	lR
ltRt	Vt
V;t#)
�
DataSourceWSLi{�WSLc�&<�V^8�dQhRS[RS[/#)r�distro�paths)r
r)rrZs"�rr�DataSourceWSL.__annotate__~s��� � �� �u� rc�6<�\SV`WW44RVnR#)r�N)�superrrr")r_�sys_cfgr�r��ud_proc�	__class__s&&&&&�rrr�DataSourceWSL.__init__~s���
����%�9���rc�&<�V^8�dQhRS[RS[/#)rrJrr)rrZs"�rrr��s���
�
�H�
��
rc��\P!V4Uu/uF'q"PP4VPbK)	ppV'g\RV,4h\
VP4Uu.uFpVP4NK	ppVF*pWcP49gK\W6,4u#	\RV,4huupiuupi)zh
Finds the most precedent of the candidate files that may contain
user-data, if any, or None otherwise.
z%s directory is emptyz6%s doesn't contain any of the expected user-data files)
r5�scandirr�casefoldrHr4rTr"�keysr)r_rJ�ef�existing_files�f�folded_names�filenames&&     r�find_user_data_file�!DataSourceWSL.find_user_data_file�s���35�*�*�X�2F�
�2F�B�G�G�������'�2F�	�
���1�H�<�=�=�4�D�4F�4F�G�
�G��
�J�J�L�G�	�
�%�H��.�.�0�0��� 8�9�9�%��D�x�O�
�	
��
��
s�-C�9Cc� <�V^8�dQhRS[/#rrX)rrZs"�rrr��s�����D�rc��VP4pV'gR#\4p\V\44pW$P	R48H# \
\3d+p\PR\T44Rp?R#Rp?ii;i)Fr�z2Unable to check_instance_id from metadata file: %sN)
�get_instance_idrDr�r"rir4r�r8r�r)r_r��currentrBr�r�s&&    r�check_instance_id�DataSourceWSL.check_instance_id�st���&�&�(����
	��;�D�-�d�M�O�D�H��l�l�=�9�9�9����$�	��K�K�D��C��
���	�s�0A
�
B�B�Bc� <�V^8�dQhRS[/#rrX)rrZs"�rrr��s���8�8�4�8rc���\P!\4'g\P	R\4R#\4Vn\
4p\T4pRpRp\YP
4Tn
TPR,pTPPR8Xd%\!\"4'gRp\%Y4wrETf Te\'TP)T4R4p\-YT.4'gR#\/YE4TnR	# \d"p\P	RT4Rp?R#Rp?ii;i \\3d+p\PR\T44Rp?R#Rp?ii;i \\3dFpT'd\P*M\PpT!RT\T44Rp?L�Rp?ii;i)
z5No WSL command %s found. Cannot detect WSL datasourceFz#Unable to detect WSL datasource: %sNzUnable to load metadata: %sr��ubuntur�z+Unable to load any user-data file in %s: %sT)r�whichrr8r9r"rDr4rKr�r�r�r�rr�rr�rmr�rVr��info�anyr��userdata_raw)	r_rF�erJr�r�r��iid�logs	&        r�	_get_data�DataSourceWSL._get_data�s����z�z�+�&�&��I�I�G��
��*�_���	�!��I�
'�y�1��+/�
�*.�	�	�2��-�-��D�M��m�m�M�*���;�;���x�'�+�,I�J�J���$8��$H�!�J�
	�� �X�%9�&�t�'?�'?��'I�2�N�	��I�*�+�+��6�z�M�����[�	��I�I�;�Q�?���	���G�$�	��I�I�3�S��X�>���	��&�G�$�	�(�#�(�(�c�i�i�C��=���C��
�
��	�sH�
D�'E�#F
�E	�(E�E	�F�F�F�
G �;G�G )r"r�r�r])rtrurvrw�dsnamerrr�r�r�ryrz�
__classcell__)r�rZs@@rr�r�{s7����
�F� � �
�
�<��&8�8�8rr�c�8�\P!V\4#r])r�list_from_depends�datasources)�dependss&r�get_datasource_listr��s���$�$�W�k�:�:r)/rx�loggingr5�typing�pathlibrrrrrn�	cloudinitrrr	�cloudinit.distrosr
�cloudinit.handlersr�cloudinit.helpersr�	getLoggerrtr8rrhr�r�rjrkrmr"r1r=rDrKrTrVr�r�r�r�r��
DataSourcer��DEP_FILESYSTEMr�r��rr�<module>r�s���F��	�
��(�(��)�)�$�4�#�
����!�� ��*��$������#�� 9��
1�
� �0"�<��(!�!�H�$"�J&�@R�j�*p�G�&�&�p�j�W�+�+�-�.���;r

Youez - 2016 - github.com/yon3zu
LinuXploit