Dre4m Shell
Server IP : 127.0.0.2  /  Your IP : 3.133.100.204
Web Server : Apache/2.4.18 (Ubuntu)
System :
User : www-data ( )
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,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,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/apport/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/apport/dump_acpi_tables.py
#!/usr/bin/python3

import os, sys, stat


def dump_acpi_table(filename, tablename, out):
    '''Dump a single ACPI table'''

    out.write('%s @ 0x00000000\n' % tablename)
    n = 0
    f = open(filename, 'rb')
    hex_str = ''
    try:
        byte = f.read(1)
        while byte != b'':
            val = ord(byte)
            if (n & 15) == 0:
                hex_str = '  %4.4x: ' % n
                ascii_str = ''

            hex_str = hex_str + '%2.2x ' % val

            if (val < 32) or (val > 126):
                ascii_str = ascii_str + '.'
            else:
                ascii_str = ascii_str + chr(val)
            n = n + 1
            if (n & 15) == 0:
                out.write('%s %s\n' % (hex_str, ascii_str))
            byte = f.read(1)
    finally:
        for i in range(n & 15, 16):
            hex_str = hex_str + '   '

        if (n & 15) != 15:
            out.write('%s %s\n' % (hex_str, ascii_str))
        f.close()
    out.write('\n')


def dump_acpi_tables(path, out):
    '''Dump ACPI tables'''

    tables = os.listdir(path)
    for tablename in tables:
        pathname = os.path.join(path, tablename)
        mode = os.stat(pathname).st_mode
        if stat.S_ISDIR(mode):
            dump_acpi_tables(pathname, out)
        else:
            dump_acpi_table(pathname, tablename, out)

if os.path.isdir('/sys/firmware/acpi/tables'):
    dump_acpi_tables('/sys/firmware/acpi/tables', sys.stdout)

Anon7 - 2022
AnonSec Team