__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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]: ~ $
#part-handler

"""This is a trivial example part-handler that creates a file with the path
specified in the payload. It performs no input checking or error handling.

To use it, first save the file you are currently viewing into your current
working directory. Then run the following:
```
$ echo '/var/tmp/my_path' > part
$ cloud-init devel make-mime -a part-handler.py:part-handler -a part:x-my-path --force > user-data
```

This will create a mime file with the contents of 'part' and the
part-handler. You can now pass 'user-data' to your cloud of choice.

When run, cloud-init will have created an empty file at /var/tmp/my_path.
"""

import pathlib
from typing import Any

from cloudinit.cloud import Cloud


def list_types():
    """Return a list of mime-types that are handled by this module."""
    return ["text/x-my-path"]


def handle_part(data: Cloud, ctype: str, filename: str, payload: Any):
    """Handle a part with the given mime-type.

    This function will get called multiple times. The first time is
    to allow any initial setup needed to handle parts. It will then get
    called once for each part matching the mime-type returned by `list_types`.
    Finally, it will get called one last time to allow for any final
    teardown.

    :data: A `Cloud` instance. This will be the same instance for each call
        to handle_part.
    :ctype: '__begin__', '__end__', or the mime-type
        (for this example 'text/x-my-path') of the part
    :filename: The filename for the part as defined in the MIME archive,
        or dynamically generated part if no filename is given
    :payload: The content of the part. This will be
        `None` when `ctype` is '__begin__' or '__end__'.
    """
    if ctype == "__begin__":
        # Any custom setup needed before handling payloads
        return

    if ctype == "__end__":
        # Any custom teardown needed after handling payloads can happen here
        return

    # If we've made it here, we're dealing with a real payload, so handle
    # it appropriately
    pathlib.Path(payload.strip()).touch()

Filemanager

Name Type Size Permission Actions
seed Folder 0755
boothook.txt File 80 B 0644
cloud-config-add-apt-repos.txt File 1.54 KB 0644
cloud-config-ansible-controller.txt.gz File 4.31 KB 0644
cloud-config-ansible-managed.txt File 3.73 KB 0644
cloud-config-ansible-pull.txt File 334 B 0644
cloud-config-apt.txt.gz File 4.83 KB 0644
cloud-config-archive-launch-index.txt File 802 B 0644
cloud-config-archive.txt File 239 B 0644
cloud-config-boot-cmds.txt File 406 B 0644
cloud-config-ca-certs.txt File 1.16 KB 0644
cloud-config-chef-oneiric.txt File 3.37 KB 0644
cloud-config-chef.txt.gz File 2.48 KB 0644
cloud-config-datasources.txt File 2.17 KB 0644
cloud-config-disk-setup.txt.gz File 2.83 KB 0644
cloud-config-gluster.txt File 456 B 0644
cloud-config-install-packages.txt File 383 B 0644
cloud-config-launch-index.txt File 570 B 0644
cloud-config-lxd.txt File 1.77 KB 0644
cloud-config-mount-points.txt File 1.47 KB 0644
cloud-config-ntp.txt File 835 B 0644
cloud-config-reporting.txt File 335 B 0644
cloud-config-run-cmds.txt File 963 B 0644
cloud-config-ssh-keys.txt File 2.24 KB 0644
cloud-config-update-apt.txt File 229 B 0644
cloud-config-update-packages.txt File 93 B 0644
cloud-config-user-groups.txt.gz File 2.77 KB 0644
cloud-config-wireguard.txt File 1.16 KB 0644
cloud-config-write-files.txt File 1.05 KB 0644
cloud-config-yum-repo.txt File 897 B 0644
cloud-config.txt.gz File 7.1 KB 0644
include-once.txt File 353 B 0644
include.txt File 434 B 0644
kernel-command-line.txt File 1 KB 0644
network-config-v1-bonded-pair.yaml File 428 B 0644
network-config-v1-bonded-vlan.yaml File 508 B 0644
network-config-v1-bridge.yaml File 638 B 0644
network-config-v1-multiple-vlan.yaml File 1.18 KB 0644
network-config-v1-nameserver.yaml File 403 B 0644
network-config-v1-physical-3-nic.yaml File 443 B 0644
network-config-v1-physical-dhcp.yaml File 100 B 0644
network-config-v1-route.yaml File 321 B 0644
network-config-v1-subnet-dhcp.yaml File 151 B 0644
network-config-v1-subnet-multiple.yaml File 364 B 0644
network-config-v1-subnet-routes.yaml File 483 B 0644
network-config-v1-subnet-static.yaml File 348 B 0644
network-config-v1-vlan.yaml File 253 B 0644
part-handler-v2.txt File 1.53 KB 0644
part-handler.txt File 2.03 KB 0644
plain-ignored.txt File 68 B 0644
user-script.txt File 125 B 0644
Filemanager