OXIESEC PANEL
- Current Dir:
/
/
usr
/
share
/
perl5
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
11/10/2024 09:42:49 AM
rwxr-xr-x
📁
Algorithm
-
01/31/2023 12:38:17 PM
rwxr-xr-x
📁
Archive
-
10/28/2024 06:50:13 AM
rwxr-xr-x
📁
CGI
-
02/11/2020 08:10:07 AM
rwxr-xr-x
📄
CGI.pm
121.63 KB
12/01/2017 08:28:05 AM
rw-r--r--
📄
CGI.pod
65.66 KB
03/29/2017 08:46:20 AM
rw-r--r--
📁
Date
-
02/11/2020 08:10:07 AM
rwxr-xr-x
📁
Debconf
-
10/21/2019 03:48:56 PM
rwxr-xr-x
📁
Debian
-
10/21/2019 03:49:16 PM
rwxr-xr-x
📄
DebianLinux.pm
5.28 KB
09/17/2016 06:12:36 AM
rw-r--r--
📁
Dpkg
-
01/31/2023 12:38:17 PM
rwxr-xr-x
📄
Dpkg.pm
2.94 KB
05/25/2022 11:14:56 AM
rw-r--r--
📁
Encode
-
02/11/2020 08:10:07 AM
rwxr-xr-x
📁
Error
-
10/21/2019 03:49:21 PM
rwxr-xr-x
📄
Error.pm
24.29 KB
10/05/2017 10:34:04 AM
rw-r--r--
📄
Fh.pm
166 bytes
12/01/2017 08:28:08 AM
rw-r--r--
📁
File
-
10/28/2024 06:50:07 AM
rwxr-xr-x
📁
Git
-
05/09/2024 07:13:18 AM
rwxr-xr-x
📄
Git.pm
45.77 KB
04/26/2023 02:14:45 PM
rw-r--r--
📁
HTML
-
02/11/2020 08:10:07 AM
rwxr-xr-x
📁
HTTP
-
02/11/2020 08:10:07 AM
rwxr-xr-x
📁
IO
-
02/11/2020 08:10:07 AM
rwxr-xr-x
📁
LWP
-
02/11/2020 08:10:07 AM
rwxr-xr-x
📁
Mail
-
10/28/2024 06:50:33 AM
rwxr-xr-x
📁
Sys
-
10/28/2024 06:50:33 AM
rwxr-xr-x
📁
Text
-
10/21/2019 03:48:34 PM
rwxr-xr-x
📁
Time
-
02/11/2020 08:10:07 AM
rwxr-xr-x
📁
URI
-
02/11/2020 08:10:06 AM
rwxr-xr-x
📄
URI.pm
33.97 KB
01/09/2018 06:42:55 AM
rw-r--r--
Editing: DebianLinux.pm
Close
# Copyright 2011 Ben Hutchings # # 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 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA package DebianLinux; use strict; use warnings; use POSIX qw(uname); use FileHandle; BEGIN { use Exporter (); our @ISA = qw(Exporter); our @EXPORT_OK = qw(version_cmp image_stem image_list read_kernelimg_conf); } sub version_split { # Split into numbers and non-numeric strings, but break the non- # numeric strings at hyphens my $version = shift; return $version =~ /(?:\d+|-?[^-\d]*)/g; } sub version_cmp { my ($left_ver, $right_ver) = @_; my @left_comp = version_split($left_ver); my @right_comp = version_split($right_ver); for (my $i = 0; ; $i++) { my $left = $left_comp[$i]; my $right = $right_comp[$i]; # Do the components indicate pre-releases? my $left_pre = defined($left) && $left =~ /^-(?:rc|trunk)$/; my $right_pre = defined($right) && $right =~ /^-(?:rc|trunk)$/; # Are the components numeric? my $left_num = defined($left) && $left =~ /^\d+/; my $right_num = defined($right) && $right =~ /^\d+/; # Pre-releases sort before anything, even end-of-string if ($left_pre or $right_pre) { return -1 if !$right_pre; return 1 if !$left_pre; } # End-of-string sorts before anything else. # End-of-string on both sides means equality. if (!defined($left) or !defined($right)) { return -1 if defined($right); return defined($left) || 0; } # Use numeric comparison if both sides numeric. # Otherwise use ASCII comparison. if ($left_num && $right_num) { return -1 if $left < $right; return 1 if $left > $right; } else { # Note that '.' > '-' thus 2.6.x.y > 2.6.x-z for any y, z. return -1 if $left lt $right; return 1 if $left gt $right; } } } # Find kernel image name stem for this architecture my $image_stem; if ((uname())[4] =~ /^(?:mips|parisc|powerpc|ppc)/) { $image_stem = 'vmlinux'; } else { $image_stem = 'vmlinuz'; } sub image_stem { return $image_stem; } sub image_list { my @results; my $prefix = "/boot/$image_stem-"; for (glob("$prefix*")) { push @results, [substr($_, length($prefix)), $_]; } return @results; } sub read_kernelimg_conf { my $conf_loc = shift || '/etc/kernel-img.conf'; my @bool_param = qw(do_symlinks link_in_boot no_symlinks); my @path_param = qw(image_dest); # These are still set in the jessie installer even though they # have no effect. Ignore them quietly. my @quiet_param = qw(do_bootloader do_initrd); # These are used only by kernel-package, and are not relevant to # anything that linux-base does. Ignore them quietly. push @quiet_param, qw(clobber_modules force_build_link relink_build_link relink_src_link silent_modules warn_reboot); # Initialise configuration to defaults my $conf = { do_symlinks => 1, image_dest => '/', link_in_boot => 0, no_symlinks => 0, }; if (my $fh = new FileHandle($conf_loc, 'r')) { while (<$fh>) { # Delete line endings, comments and blank lines chomp; s/\#.*$//g; next if /^\s*$/; # Historically this was done by matching against one # (path) or two (bool) regexps per parameter, with no # attempt to ensure that each line matched one. We now # warn about syntax errors, but for backward compatibility # we never treat them as fatal. # Parse into name = value if (!/^\s*(\w+)\s*=\s*(.*)/) { print STDERR "$conf_loc:$.: W: ignoring line with syntax error\n"; next; } my ($name, $value) = (lc($1), $2); # Parse value according to expected type if (grep({$_ eq $name} @bool_param)) { if ($value =~ /^(?:no|false|0)\s*$/i) { $conf->{$name} = 0; } elsif ($value =~ /^(?:yes|true|1)\s*$/i) { $conf->{$name} = 1; } else { print STDERR "$conf_loc:$.: W: ignoring invalid value for $name\n"; } } elsif (grep({$_ eq $name} @path_param)) { # Only one space-separated word is supported $value =~ /^(\S*)(.*)/; ($conf->{$name}, my $excess) = ($1, $2); if ($excess =~ /\S/) { print STDERR "$conf_loc:$.: W: ignoring excess values for $name\n"; } } elsif (grep({$_ eq $name} @quiet_param)) { ; } else { print STDERR "$conf_loc:$.: W: ignoring unknown parameter $name\n"; } } $fh->close(); } # This is still set (to 0) by default in jessie so we should only # warn if the default is changed if ($conf->{no_symlinks}) { print STDERR "$conf_loc: W: ignoring no_symlinks; only symlinks are supported\n"; } delete $conf->{no_symlinks}; if ($conf->{link_in_boot}) { $conf->{image_dest} = '/boot'; } delete $conf->{link_in_boot}; return $conf; } 1;