OXIESEC PANEL
- Current Dir:
/
/
usr
/
share
/
apport
/
package-hooks
Server IP: 10.0.0.4
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/18/2022 06:42:22 AM
rwxr-xr-x
📄
apache2.py
1.77 KB
02/23/2021 04:35:16 PM
rw-r--r--
📄
cloud-init.py
176 bytes
06/15/2022 04:38:21 PM
rw-r--r--
📄
cryptsetup.py
1.06 KB
08/23/2018 02:36:42 PM
rw-r--r--
📄
isc-dhcp-client.py
1.75 KB
02/26/2021 04:58:50 PM
rw-r--r--
📄
openssh-client.py
1.14 KB
08/11/2021 06:02:09 PM
rw-r--r--
📄
openssh-server.py
1011 bytes
08/11/2021 06:02:09 PM
rw-r--r--
📄
source_apparmor.py
2.8 KB
03/22/2018 08:08:03 PM
rw-r--r--
📄
source_apport.py
569 bytes
11/11/2019 09:57:56 PM
rw-r--r--
📄
source_apport.pyc
830 bytes
05/18/2022 06:42:22 AM
rw-r--r--
📄
source_byobu.py
417 bytes
04/07/2016 10:05:52 PM
rw-r--r--
📄
source_console-setup.py
374 bytes
04/23/2019 12:04:14 PM
rw-r--r--
📄
source_debian-installer.py
1.86 KB
11/11/2019 09:57:56 PM
rw-r--r--
📄
source_debian-installer.pyc
2.04 KB
05/18/2022 06:42:22 AM
rw-r--r--
📄
source_grub2.py
3.69 KB
02/23/2021 04:23:39 PM
rw-r--r--
📄
source_linux-firmware.py
6.11 KB
11/11/2019 09:57:56 PM
rw-r--r--
📄
source_linux-firmware.pyc
4.45 KB
05/18/2022 06:42:22 AM
rw-r--r--
📄
source_linux-meta-oem-osp1.py
6.11 KB
11/11/2019 09:57:56 PM
rw-r--r--
📄
source_linux-meta-oem-osp1.pyc
4.46 KB
05/18/2022 06:42:22 AM
rw-r--r--
📄
source_linux-meta-oem.py
6.11 KB
11/11/2019 09:57:56 PM
rw-r--r--
📄
source_linux-meta-oem.pyc
4.45 KB
05/18/2022 06:42:22 AM
rw-r--r--
📄
source_linux-meta.py
6.11 KB
11/11/2019 09:57:56 PM
rw-r--r--
📄
source_linux-meta.pyc
4.45 KB
05/18/2022 06:42:22 AM
rw-r--r--
📄
source_linux-nexus7.py
948 bytes
11/11/2019 09:57:56 PM
rw-r--r--
📄
source_linux-nexus7.pyc
1.11 KB
05/18/2022 06:42:22 AM
rw-r--r--
📄
source_linux-oem-osp1.py
6.11 KB
11/11/2019 09:57:56 PM
rw-r--r--
📄
source_linux-oem-osp1.pyc
4.45 KB
05/18/2022 06:42:22 AM
rw-r--r--
📄
source_linux-oem.py
6.11 KB
11/11/2019 09:57:56 PM
rw-r--r--
📄
source_linux-oem.pyc
4.44 KB
05/18/2022 06:42:22 AM
rw-r--r--
📄
source_linux-signed-oem-osp1.py
6.11 KB
11/11/2019 09:57:56 PM
rw-r--r--
📄
source_linux-signed-oem-osp1.pyc
4.47 KB
05/18/2022 06:42:22 AM
rw-r--r--
📄
source_linux-signed-oem.py
6.11 KB
11/11/2019 09:57:56 PM
rw-r--r--
📄
source_linux-signed-oem.pyc
4.46 KB
05/18/2022 06:42:22 AM
rw-r--r--
📄
source_linux-signed.py
6.11 KB
11/11/2019 09:57:56 PM
rw-r--r--
📄
source_linux-signed.pyc
4.45 KB
05/18/2022 06:42:22 AM
rw-r--r--
📄
source_linux.py
6.11 KB
11/11/2019 09:57:56 PM
rw-r--r--
📄
source_linux.pyc
4.44 KB
05/18/2022 06:42:22 AM
rw-r--r--
📄
source_mdadm.py
2.2 KB
01/14/2020 07:10:59 PM
rw-r--r--
📄
source_mysql-5.7.py
2.46 KB
08/19/2021 04:34:52 PM
rw-r--r--
📄
source_plymouth.py
1.26 KB
04/04/2019 03:41:18 PM
rw-r--r--
📄
source_samba.py
7.37 KB
01/25/2022 03:20:03 PM
rw-r--r--
📄
source_shadow.py
720 bytes
11/29/2022 12:25:19 PM
rw-r--r--
📄
source_shim-signed.py
1.95 KB
08/27/2020 11:32:46 AM
rw-r--r--
📄
source_shim.py
1.95 KB
08/27/2020 11:32:46 AM
rw-r--r--
📄
source_sudo.py
1.13 KB
01/19/2021 02:36:00 PM
rw-r--r--
📄
source_ubiquity.py
7.55 KB
11/11/2019 09:57:56 PM
rw-r--r--
📄
source_ubiquity.pyc
6.11 KB
05/18/2022 06:42:22 AM
rw-r--r--
📄
source_ubuntu-release-upgrader.py
2.19 KB
06/06/2019 06:46:11 PM
rw-r--r--
📄
source_unattended-upgrades.py
705 bytes
02/17/2020 11:37:03 AM
rw-r--r--
📄
source_update-manager.py
2.24 KB
10/31/2018 11:29:09 AM
rw-r--r--
📄
systemd.py
872 bytes
09/06/2022 03:18:05 AM
rw-r--r--
📄
udev.py
455 bytes
09/06/2022 03:18:05 AM
rw-r--r--
📄
ureadahead.py
475 bytes
04/09/2019 09:01:18 PM
rw-r--r--
Editing: source_mdadm.py
Close
'''apport package hook for mdadm (c) 2009-2016 Canonical Ltd. Author: Steve Beattie <sbeattie@ubuntu.com> Based on the ideas in debian's /usr/share/bug/mdadm/script ''' from apport.hookutils import attach_file, attach_file_if_exists, attach_hardware, path_to_key, command_output import os import re import glob import gzip import subprocess import sys def get_initrd_files(pattern): '''Extract listing of files from the current initrd which match a regex. pattern should be a "re" object. ''' (_, _, release, _, _) = os.uname() try: fd = gzip.GzipFile('/boot/initrd.img-' + release, 'rb') # universal_newlines needs to be False here as we're passing # binary data from gzip into cpio, which means we'll need to # decode the bytes into strings later when reading the output cpio = subprocess.Popen(['cpio', '-t'], close_fds=True, stderr=subprocess.STDOUT, stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=False) except OSError as e: return 'Error: ' + str(e) out = cpio.communicate(fd.read())[0].decode(sys.stdout.encoding, errors='replace') if cpio.returncode != 0: return 'Error: command %s failed with exit code %i %' % ( 'cpio', cpio.returncode, out) lines = ''.join([l for l in out.splitlines(True) if pattern.search(l)]) return lines def add_info(report): attach_hardware(report) attach_file(report, '/proc/mounts', 'ProcMounts') attach_file_if_exists(report, '/etc/mdadm/mdadm.conf', 'mdadm.conf') attach_file(report, '/proc/mdstat', 'ProcMDstat') attach_file(report, '/proc/partitions', 'ProcPartitions') attach_file(report, '/etc/blkid.tab', 'etc.blkid.tab') attach_file_if_exists(report, '/boot/grub/menu.lst', 'GrubMenu.lst') attach_file_if_exists(report, '/boot/grub/grub.cfg', 'Grub.cfg') attach_file_if_exists(report, '/etc/lilo.conf', 'lilo.conf') devices = glob.glob("/dev/[hs]d*") for dev in devices: report['MDadmExamine' + path_to_key(dev)] = command_output(['/sbin/mdadm', '-E', dev]) initrd_re = re.compile('md[a/]') report['initrd.files'] = get_initrd_files(initrd_re)