!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/usr/share/webmin/lvm/   drwxr-xr-x
Free 28.84 GB of 117.98 GB (24.45%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     raid_create.cgi (2.85 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# Create a RAID logical volume

require './lvm-lib.pl';
&error_setup($text{'raid_err'});
&ReadParse();
($vg) = grep { $_->{'name'} eq $in{'vg'} } &list_volume_groups();
$vg || &error($text{'vg_egone'});

# Parse and validate inputs
&error_setup($text{'raid_err'});
$in{'name'} =~ /^[A-Za-z0-9\.\-\_]+$/ || &error($text{'lv_ename'});
($same) = grep { $_->{'name'} eq $in{'name'} }
           &list_logical_volumes($in{'vg'});
$same && &error($text{'lv_esame'});
if ($in{'size_mode'} == 0) {
    # Absolute size
    $in{'size'} =~ /^\d+$/ || &error($text{'lv_esize'});
    $size = $in{'size'};
    if (defined($in{'size_units'})) {
        # Convert selected units to kB
        $size *= $in{'size_units'}/1024;
        }
    $sizeof = undef;
    }
elsif ($in{'size_mode'} == 1) {
    # Size of VG
    $in{'vgsize'} =~ /^\d+$/ &&
        $in{'vgsize'} > 0 &&
        $in{'vgsize'} <= 100 || &error($text{'lv_evgsize'});
    $size = $in{'vgsize'};
    $sizeof = 'VG';
    }
elsif ($in{'size_mode'} == 2) {
    # Size of free space
    if (!$in{'lv'}) {
        $in{'freesize'} =~ /^\d+$/ &&
            $in{'freesize'} > 0 &&
            $in{'freesize'} <= 100 || &error($text{'lv_efreesize'});
        }
    $size = $in{'freesize'};
    $sizeof = 'FREE';
    }
elsif ($in{'size_mode'} == 3) {
    # Size of some PV
    $in{'pvsize'} =~ /^\d+$/ &&
        $in{'pvsize'} > 0 &&
        $in{'pvsize'} <= 100 || &error($text{'lv_epvsize'});
    $size = $in{'pvsize'};
    $sizeof = $in{'pvof'};
    }
if ($in{'raid_mode'} eq 'raid0') {
    $in{'raid_stripe0'} =~ /^\d+$/ && $in{'raid_stripe0'} >= 2 ||
        &error($text{'raid_estripe0'});
    $stripes = $in{'raid_stripe0'};
    }
elsif ($in{'raid_mode'} eq 'raid1') {
    $in{'raid_mirror1'} =~ /^\d+$/ && $in{'raid_mirror1'} >= 1 ||
        &error($text{'raid_emirror1'});
    $mirrors = $in{'raid_mirror1'};
    }
elsif ($in{'raid_mode'} eq 'raid4') {
    $in{'raid_stripe4'} =~ /^\d+$/ && $in{'raid_stripe4'} >= 2 ||
        &error($text{'raid_estripe4'});
    $stripes = $in{'raid_stripe4'};
    }
elsif ($in{'raid_mode'} eq 'raid5') {
    $in{'raid_stripe5'} =~ /^\d+$/ && $in{'raid_stripe5'} >= 2 ||
        &error($text{'raid_estripe5'});
    $stripes = $in{'raid_stripe5'};
    }
elsif ($in{'raid_mode'} eq 'raid6') {
    $in{'raid_stripe6'} =~ /^\d+$/ && $in{'raid_stripe6'} >= 2 ||
        &error($text{'raid_estripe6'});
    $stripes = $in{'raid_stripe6'};
    }
elsif ($in{'raid_mode'} eq 'raid10') {
    $in{'raid_stripe10'} =~ /^\d+$/ && $in{'raid_stripe10'} >= 2 ||
        &error($text{'raid_estripe10'});
    $stripes = $in{'raid_stripe10'};
    }
$mirrors || $stripes || &error($text{'raid_eeither'});

# Create the LV
$lv = { };
$lv->{'vg'} = $in{'vg'};
$lv->{'name'} = $in{'name'};
$lv->{'size'} = $size;
$lv->{'size_of'} = $sizeof;
$lv->{'raid'} = $in{'raid_mode'};
$lv->{'mirrors'} = $mirrors;
$lv->{'stripes'} = $stripes;
$lv->{'perm'} = $in{'perm'};
$lv->{'alloc'} = $in{'alloc'};
$lv->{'readahead'} = $in{'readahead'};
$err = &create_raid_volume($lv);
&error($err) if ($err);

&webmin_log("raid", "lv", $in{'name'}, $lv);
&redirect("index.cgi?mode=lvs");

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.004 ]--