shell bypass 403
UnknownSec Shell
:
/
usr
/
share
/
netplan
/
netplan_cli
/
cli
/
commands
/
__pycache__
/ [
drwxr-xr-x
]
upload
mass deface
mass delete
console
info server
name :
generate.cpython-312.pyc
� ��~f � �f � d Z ddlZddlZddlZddlZddlZddlmZ G d� dej � Z y)znetplan generate command line� N� )�utilsc �* � � e Zd Z� fd�Zd� Zd� Z� xZS )�NetplanGeneratec �* �� t �| � ddd�� y )N�generatezFGenerate backend specific configuration files from /etc/netplan/*.yamlT)� command_id�description�leaf)�super�__init__)�self� __class__s ��7/usr/share/netplan/netplan_cli/cli/commands/generate.pyr zNetplanGenerate.__init__ s �� � ���J�&A�"� � $� c �� � | j j dd�� | j j dd�� | j | _ | j � | j � y )N� --root-dirzOSearch for and generate configuration files in this root directory instead of /)�help� --mappingzFDisplay the netplan device ID/backend/interface name mapping and exit.)�parser�add_argument�command_generate�func� parse_args�run_command)r s r �runzNetplanGenerate.run% sa � ���� � ��&w� !� y���� � ��&n� !� p� �)�)�� ��������r c � � dt j v rct j d� }|�t d� �t j |ddddddd g� }|d k7 r|dk( rt d� �t d |z � �y t j � g}| j r|d| j gz }| j r|d| j gz }t j d|� t j |� } t j � t# j$ |� y # t j $ r}t j |� Y d }~�Cd }~ww xY w)N�SNAP�busctlzmissing busctl utility�callz--quietz--systemzio.netplan.Netplanz/io/netplan/Netplan�Generater � z8PermissionError: failed to communicate with dbus servicez?RuntimeError: failed to communicate with dbus service: error %sr r zcommand generate: running %s)�os�environ�shutil�which�RuntimeError� subprocessr �PermissionErrorr �get_generator_path�root_dir�mapping�logging�debug�systemctl_daemon_reload�CalledProcessError�warning�sys�exit)r r �res�argv�es r r z NetplanGenerate.command_generate0 s@ � ��R�Z�Z�� �\�\�(�+�F��~�"�#;�<�<� �/�/�6�6�9�j�#7�#8�#7�#-� #%� &�C� �a�x��#�:�)�R�T� T� '�Y�\_�_�a� a� ��(�(�*�+���=�=��\�4�=�=�1�1�D��<�<��[�$�,�,�/�/�D�� � �4�d�;��o�o�d�#�� ��)�)�+� ���� �� �,�,� ��O�O�A���� �s �1D �E �.E�E )�__name__� __module__�__qualname__r r r � __classcell__)r s @r r r s �� �$� �,r r ) �__doc__r- r# r2 r( r% � r �NetplanCommandr � r r �<module>r? s. ��$ $� � � � � � �?�e�*�*� ?r
© 2026 UnknownSec