403Webshell
Server IP : 104.21.38.3  /  Your IP : 108.162.227.63
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/apport/package-hooks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/apport/package-hooks/source_shim.py
'''apport package hook for shim and shim-signed

(c) 2015 Canonical Ltd.
Author: Brian Murray <[email protected]>
'''

import errno
import os
import re

from apport.hookutils import (
    command_available,
    command_output,
    recent_syslog,
    attach_file,
    attach_root_command_outputs)

efiarch = {'amd64': 'x64',
           'i386': 'ia32',
           'arm64': 'aa64'
          }
grubarch = {'amd64': 'x86_64',
            'i386': 'i386',
            'arm64': 'arm64'
           }

def add_info(report, ui):
    efiboot = '/boot/efi/EFI/ubuntu'
    if command_available('efibootmgr'):
        report['EFIBootMgr'] = command_output(['efibootmgr', '-v'])
    else:
        report['EFIBootMgr'] = 'efibootmgr not available'
    commands = {}
    try:
        directory = os.stat(efiboot)
    except OSError as e:
        if e.errno == errno.ENOENT:
            report['Missing'] = '/boot/efi/EFI/ubuntu directory is missing'
            return
        if e.errno == errno.EACCES:
            directory= True
    if directory:
        arch = report['Architecture']
        commands['BootEFIContents'] = 'ls %s' % efiboot
        commands['ShimDiff'] = 'diff %s/shim%s.efi /usr/lib/shim/shim%s.efi.signed' % (efiboot, efiarch[arch], efiarch[arch])
        commands['GrubDiff'] = 'diff %s/grub%s.efi /usr/lib/grub/%s-efi-signed/grub%s.efi.signed' %(efiboot, efiarch[arch], grubarch[arch], efiarch[arch])

    efivars_dir = '/sys/firmware/efi/efivars'
    sb_var = os.path.join(efivars_dir,
                          'SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c')
    mok_var = os.path.join(efivars_dir,
                           'MokSBStateRT-605dab50-e046-4300-abb6-3dd810dd8b23')

    attach_file(report, '/proc/sys/kernel/moksbstate_disabled')
    commands['SecureBoot'] = 'od -An -t u1 %s' % sb_var
    commands['MokSBStateRT'] = 'od -An -t u1 %s' % mok_var
    attach_root_command_outputs(report, commands)
    report['EFITables'] = recent_syslog(re.compile(r'(efi|esrt):|Secure boot'))

Youez - 2016 - github.com/yon3zu
LinuXploit