!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/virtual-server/   drwxrwxr-x
Free 28.57 GB of 117.98 GB (24.22%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     list-php-directories.pl (2.6 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl

=head1 list-php-directories.pl

List all directories in which a specific version of PHP has been activated

By default this command outputs a table of directories for the virtual server
specified with the C<--domain> parameter. However, the C<--multiline> flag
can be used to output more detail about each directory in a format more
easily parsed by other programs. Or if you just want a list of directories,
use the C<--name-only> flag.

By default only the base version numbers are shown, but you can switch to
showing the complete version with the C<--full-version> flag.

=cut

package virtual_server;
if (!$module_name) {
    $main::no_acl_check++;
    $ENV{'WEBMIN_CONFIG'} ||= "/etc/webmin";
    $ENV{'WEBMIN_VAR'} ||= "/var/webmin";
    if ($0 =~ /^(.*)\/[^\/]+$/) {
        chdir($pwd = $1);
        }
    else {
        chop($pwd = `pwd`);
        }
    $0 = "$pwd/list-users.pl";
    require './virtual-server-lib.pl';
    $< == 0 || die "list-php-directories.pl must be run as root";
    }

# Parse command-line args
$owner = 1;
while(@ARGV > 0) {
    local $a = shift(@ARGV);
    if ($a eq "--domain") {
        $domain = shift(@ARGV);
        }
    elsif ($a eq "--multiline") {
        $multi = 1;
        }
    elsif ($a eq "--name-only") {
        $nameonly = 1;
        }
    elsif ($a eq "--full-version") {
        $fullver = 1;
        }
    elsif ($a eq "--help") {
        &usage();
        }
    else {
        &usage("Unknown parameter $a");
        }
    }

$domain || &usage("No domain specified");
$d = &get_domain_by("dom", $domain);
$d || usage("Virtual server $domain does not exist");
@dirs = &list_domain_php_directories($d);

if ($multi) {
    # Show on separate lines
    foreach $dir (@dirs) {
        my $fullver = &get_php_version($dir->{'version'}, $d);
        print $dir->{'dir'},"\n";
        print "  PHP version: $dir->{'version'}\n";
        print "  Full version: $fullver\n" if ($fullver);
        print "  Execution mode: $dir->{'mode'}\n";
        print "  Web root directory: ",
            ($dir->{'dir'} eq &public_html_dir($d) ? "Yes" : "No"),"\n";
        }
    }
elsif ($nameonly) {
    # Just directories
    foreach $dir (@dirs) {
                print $dir->{'dir'},"\n";
        }
    }
else {
    # Show in table
    $fmt = "%-70.70s %-7.7s\n";
    printf $fmt, "Directory", "Version";
    printf $fmt, ("-" x 70), ("-" x 7);
    foreach $dir (@dirs) {
        my $v = $fullver ? &get_php_version($dir->{'version'})
                 : $dir->{'version'};
        printf $fmt, $dir->{'dir'}, $v;
        }
    }

sub usage
{
print "$_[0]\n\n" if ($_[0]);
print "Lists web directories with different PHP versions in a virtual server.\n";
print "\n";
print "virtualmin list-php-directories --domain domain.name\n";
print "                               [--multiline | --name-only]\n";
print "                               [--full-version]\n";
exit(1);
}


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

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