__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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:

www-data@216.73.216.10: ~ $
"""Send reports about subiquity to the correct Launchpad project."""

import os
import re

from apport import Report, hookutils
from apport.ui import HookUI


def get_journal(report: Report, log_map: dict[str, str]) -> None:
    """Get installer environment journal log.

    Appends the installer specific journal to the log map if it exists,
    otherwise appends the system journal to the report directly.
    """
    installer_journal = "/var/log/installer/installer-journal.txt"
    if os.path.exists(installer_journal):
        log_map["InstallerJournal"] = installer_journal
    else:
        report["SystemJournal"] = hookutils.recent_syslog(re.compile("."))


def get_revision(debug_log_contents: str) -> str:
    """Get subiquity revision from debug log contents.

    Returns revision found (e.g. "1234") or "unknown" if not found.
    """
    # Revision information is always in the first line of the log file
    first_line = debug_log_contents.splitlines()[0]
    marker = "Starting Subiquity server revision"
    if marker in first_line:
        revision = first_line.split(marker)[1].strip()
    else:
        revision = "unknown"

    return revision


def add_info(report: Report, unused_ui: HookUI) -> None:
    """Package hook entry point."""
    # Check if the snap was updated
    # TODO: Add logic to support this outside of the live environment.
    #       It may be possible someone wants to report a bug against the
    #       installer after first boot.
    report["SnapUpdated"] = str(os.path.exists("/run/subiquity/updating"))

    # rewrite this section so the report goes to the project in Launchpad
    report[
        "CrashDB"
    ] = """\
{
    "impl": "launchpad",
    "project": "subiquity",
    "bug_pattern_url": "http://people.canonical.com/"
    "~ubuntu-archive/bugpatterns/bugpatterns.xml",
}
"""

    # add in hardware information
    hookutils.attach_hardware(report)

    # This key is important for checking revision information later
    debug_log_key = "InstallerServerLog"

    # static subiquity generated logs
    log_map = {
        debug_log_key: "/var/log/installer/subiquity-server-debug.log",
        "InstallerServerLogInfo": "/var/log/installer/subiquity-server-info.log",
        "InstallerClientLog": "/var/log/installer/subiquity-client-debug.log",
        "InstallerClientLogInfo": "/var/log/installer/subiquity-client-info.log",
        "CurtinLog": "/var/log/installer/curtin-install.log",
        "CurtinAptConfig": (
            "/var/log/installer/curtin-install/subiquity-curtin-apt.conf"
        ),
        "CurtinCurthooksConfig": (
            "/var/log/installer/curtin-install/subiquity-curthooks.conf"
        ),
        "CurtinExtractConfig": (
            "/var/log/installer/curtin-install/subiquity-extract.conf"
        ),
        "CurtinInitialConfig": (
            "/var/log/installer/curtin-install/subiquity-initial.conf"
        ),
        "CurtinPartitioningConfig": (
            "/var/log/installer/curtin-install/subiquity-partitioning.conf"
        ),
        "ProbeData": "/var/log/installer/block/probe-data.json",
        "Traceback": "/var/log/installer/subiquity-traceback.txt",
        "NetplanInstallerConfig": "/etc/netplan/00-installer-config.yaml",
        "NetplanSnapdConfig": "/etc/netplan/00-snapd-config.yaml",
    }

    # Add journal log
    get_journal(report, log_map)

    # Add ubuntu-desktop-bootstrap information if available
    udb_log = os.path.realpath("/var/log/installer/ubuntu_bootstrap.log")
    if os.path.exists(udb_log):
        log_map["BootstrapLog"] = udb_log
        report.add_tags(["ubuntu-desktop-bootstrap"])
        # check for udb snap version
        udb_snap = os.path.realpath("/snap/ubuntu-desktop-bootstrap/current")
        if os.path.exists(udb_snap):
            # "current" is a symlink to the current revision and
            # os.path.realpath should have resolved it
            report["DesktopInstallerRev"] = os.path.basename(udb_snap)

    # Attach logs if they exist
    # The conventional way to attach logs would be to use the
    # hookutils.attach_file_if_exists method, but since subiquity logs
    # are mostly locked down with root r/w only then we will get a permission
    # error if the caller does not have permissions. Ask for elevated
    # permissions instead of requiring users know to run with sudo or similar
    command_mapping = {}
    for name, path in log_map.items():
        if os.path.exists(path):
            real_path = os.path.realpath(path)
            command_mapping[name] = f"cat {real_path}"

    hookutils.attach_root_command_outputs(report, command_mapping)

    # Get revision to display in the UI prompt
    # If attach_root_command_outputs fails the log won't be in the report
    revision = "unknown"
    if debug_log_key in report:
        revision = get_revision(report[debug_log_key])
    report["Package"] = f"subiquity ({revision})"
    report["SourcePackage"] = "subiquity"

    # Package and SourcePackage keys are deleted when the Snap is chosen,
    # so make a separate key to keep track of the revision
    report["SnapVersion"] = revision

    # Always set reports to private since we might collect sensitive data
    report["LaunchpadPrivate"] = "1"

Filemanager

Name Type Size Permission Actions
apache2.py File 1.77 KB 0644
bind9.py File 738 B 0644
cryptsetup.py File 1.06 KB 0644
libatasmart4.py File 943 B 0644
openssh-client.py File 1.18 KB 0644
openssh-server.py File 1004 B 0644
source_apparmor.py File 2.72 KB 0644
source_apport.py File 623 B 0644
source_byobu.py File 339 B 0644
source_console-setup.py File 374 B 0644
source_fontconfig.py File 162 B 0644
source_grub2.py File 3.79 KB 0644
source_linux-aws.py File 6.5 KB 0644
source_linux-azure-nvidia.py File 6.5 KB 0644
source_linux-azure.py File 6.5 KB 0644
source_linux-firmware.py File 6.5 KB 0644
source_linux-gcp-6.11.py File 6.5 KB 0644
source_linux-gcp-6.14.py File 6.5 KB 0644
source_linux-gcp.py File 6.5 KB 0644
source_linux-gke.py File 6.5 KB 0644
source_linux-gkeop.py File 6.5 KB 0644
source_linux-hwe-6.11.py File 6.5 KB 0644
source_linux-hwe-6.14.py File 6.5 KB 0644
source_linux-ibm.py File 6.5 KB 0644
source_linux-lowlatency-hwe-6.11.py File 6.5 KB 0644
source_linux-lowlatency-hwe-6.14.py File 6.5 KB 0644
source_linux-lowlatency.py File 6.5 KB 0644
source_linux-meta-aws.py File 6.5 KB 0644
source_linux-meta-azure-nvidia.py File 6.5 KB 0644
source_linux-meta-azure.py File 6.5 KB 0644
source_linux-meta-gcp-6.11.py File 6.5 KB 0644
source_linux-meta-gcp-6.14.py File 6.5 KB 0644
source_linux-meta-gcp.py File 6.5 KB 0644
source_linux-meta-gke.py File 6.5 KB 0644
source_linux-meta-gkeop.py File 6.5 KB 0644
source_linux-meta-hwe-6.11.py File 6.5 KB 0644
source_linux-meta-hwe-6.14.py File 6.5 KB 0644
source_linux-meta-ibm.py File 6.5 KB 0644
source_linux-meta-lowlatency-hwe-6.11.py File 6.5 KB 0644
source_linux-meta-lowlatency-hwe-6.14.py File 6.5 KB 0644
source_linux-meta-lowlatency.py File 6.5 KB 0644
source_linux-meta-nvidia-lowlatency.py File 6.5 KB 0644
source_linux-meta-nvidia.py File 6.5 KB 0644
source_linux-meta-oem-6.11.py File 6.5 KB 0644
source_linux-meta-oem-6.14.py File 6.5 KB 0644
source_linux-meta-oem-6.8.py File 6.5 KB 0644
source_linux-meta-oem-osp1.py File 6.5 KB 0644
source_linux-meta-oem.py File 6.5 KB 0644
source_linux-meta-oracle.py File 6.5 KB 0644
source_linux-meta-raspi.py File 6.5 KB 0644
source_linux-meta-realtime.py File 6.5 KB 0644
source_linux-meta-riscv.py File 6.5 KB 0644
source_linux-meta.py File 6.5 KB 0644
source_linux-nvidia-lowlatency.py File 6.5 KB 0644
source_linux-nvidia.py File 6.5 KB 0644
source_linux-oem-6.11.py File 6.5 KB 0644
source_linux-oem-6.14.py File 6.5 KB 0644
source_linux-oem-6.8.py File 6.5 KB 0644
source_linux-oem-osp1.py File 6.5 KB 0644
source_linux-oem.py File 6.5 KB 0644
source_linux-oracle.py File 6.5 KB 0644
source_linux-raspi.py File 6.5 KB 0644
source_linux-realtime.py File 6.5 KB 0644
source_linux-restricted-modules-aws.py File 6.5 KB 0644
source_linux-restricted-modules-azure-nvidia.py File 6.5 KB 0644
source_linux-restricted-modules-azure.py File 6.5 KB 0644
source_linux-restricted-modules-gcp-6.11.py File 6.5 KB 0644
source_linux-restricted-modules-gcp-6.14.py File 6.5 KB 0644
source_linux-restricted-modules-gcp.py File 6.5 KB 0644
source_linux-restricted-modules-hwe-6.11.py File 6.5 KB 0644
source_linux-restricted-modules-hwe-6.14.py File 6.5 KB 0644
source_linux-restricted-modules-ibm.py File 6.5 KB 0644
source_linux-restricted-modules-lowlatency-hwe-6.11.py File 6.5 KB 0644
source_linux-restricted-modules-lowlatency-hwe-6.14.py File 6.5 KB 0644
source_linux-restricted-modules-lowlatency.py File 6.5 KB 0644
source_linux-restricted-modules-nvidia-lowlatency.py File 6.5 KB 0644
source_linux-restricted-modules-nvidia.py File 6.5 KB 0644
source_linux-restricted-modules-oem-6.11.py File 6.5 KB 0644
source_linux-restricted-modules-oem-6.14.py File 6.5 KB 0644
source_linux-restricted-modules-oem-6.8.py File 6.5 KB 0644
source_linux-restricted-modules-oracle.py File 6.5 KB 0644
source_linux-restricted-modules.py File 6.5 KB 0644
source_linux-riscv.py File 6.5 KB 0644
source_linux-signed-aws.py File 6.5 KB 0644
source_linux-signed-azure-nvidia.py File 6.5 KB 0644
source_linux-signed-azure.py File 6.5 KB 0644
source_linux-signed-gcp-6.11.py File 6.5 KB 0644
source_linux-signed-gcp-6.14.py File 6.5 KB 0644
source_linux-signed-gcp.py File 6.5 KB 0644
source_linux-signed-gke.py File 6.5 KB 0644
source_linux-signed-gkeop.py File 6.5 KB 0644
source_linux-signed-hwe-6.11.py File 6.5 KB 0644
source_linux-signed-hwe-6.14.py File 6.5 KB 0644
source_linux-signed-ibm.py File 6.5 KB 0644
source_linux-signed-lowlatency-hwe-6.11.py File 6.5 KB 0644
source_linux-signed-lowlatency-hwe-6.14.py File 6.5 KB 0644
source_linux-signed-lowlatency.py File 6.5 KB 0644
source_linux-signed-nvidia-lowlatency.py File 6.5 KB 0644
source_linux-signed-nvidia.py File 6.5 KB 0644
source_linux-signed-oem-6.11.py File 6.5 KB 0644
source_linux-signed-oem-6.14.py File 6.5 KB 0644
source_linux-signed-oem-6.8.py File 6.5 KB 0644
source_linux-signed-oem-osp1.py File 6.5 KB 0644
source_linux-signed-oem.py File 6.5 KB 0644
source_linux-signed-oracle.py File 6.5 KB 0644
source_linux-signed-realtime.py File 6.5 KB 0644
source_linux-signed.py File 6.5 KB 0644
source_linux.py File 6.5 KB 0644
source_mariadb.py File 1.91 KB 0644
source_mdadm.py File 2.2 KB 0644
source_plymouth.py File 1.44 KB 0644
source_shadow.py File 720 B 0644
source_sudo.py File 1.13 KB 0755
source_ubiquity.py File 8.66 KB 0644
source_ubuntu-advantage-tools.py File 1.22 KB 0644
source_ubuntu-release-upgrader.py File 2.62 KB 0644
source_unattended-upgrades.py File 705 B 0644
source_update-manager.py File 2.49 KB 0644
subiquity.py File 5.13 KB 0644
systemd.py File 871 B 0644
ubuntu-desktop-bootstrap.py File 3.13 KB 0644
ubuntu-drivers-common.py File 270 B 0644
udev.py File 455 B 0644
udisks2.py File 752 B 0644
Filemanager