!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 29.29 GB of 117.98 GB (24.83%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

=head1 list-proxies.pl

Lists web proxy balancers in some domain

This command lists all the proxies configured for some domain identified
by the C<--domain> parameter. By default the list is in a reader-friendly
table format, but can be switched to a more complete and parsable output with
the C<--multiline> flag. Or you can have just the proxy paths listed with
the C<--name-only> parameter.

=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-proxies.pl";
    require './virtual-server-lib.pl';
    $< == 0 || die "list-proxies.pl must be run as root";
    }

# Parse command-line args
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;
        }
    else {
        &usage("Unknown parameter $a");
        }
    }

$domain || &usage("No domain specified");
$d = &get_domain_by("dom", $domain);
$d || usage("Virtual server $domain does not exist");
&has_proxy_balancer($d) || &usage("Proxies cannot be configured for this virtual server");

@balancers = &list_proxy_balancers($d);
if ($multi) {
    # Show each destination on a separate line
    &get_balancer_usage($d, \%used, \%pused);
    foreach $b (@balancers) {
        print "$b->{'path'}\n";
        if ($b->{'balancer'}) {
            print "    Balancer: $b->{'balancer'}\n";
            }
        print "    Proxying: ",$b->{'none'} ? "No" : "Yes","\n";
        foreach $u (@{$b->{'urls'}}) {
            print "    URL: $u\n";
            }
        if ($sinfo = $used{$b->{'path'}}) {
            print "    Script name: $sinfo->{'name'}\n";
            print "    Script version: $sinfo->{'version'}\n";
            }
        if ($pinfo = $pused{$b->{'path'}}) {
            print "    Plugin module: $pinfo->{'plugin'}\n";
            print "    Plugin use: $pinfo->{'desc'}\n";
            }
        }
    }
elsif ($nameonly) {
    # Just show paths
    foreach $b (@balancers) {
        print $b->{'path'},"\n";
        }
    }
else {
    # Show all on one line
    $fmt = "%-20s %-59s\n";
    printf $fmt, "Path", "URLs";
    printf $fmt, ("-" x 20), ("-" x 59);
    foreach $b (@balancers) {
        printf $fmt, $b->{'path'}, $b->{'none'} ? "No proxying" :
                        join(" ", @{$b->{'urls'}});
        }
    }

sub usage
{
print "$_[0]\n\n" if ($_[0]);
print "Lists the web proxy balancers in some virtual server.\n";
print "\n";
print "virtualmin list-proxies --domain domain.name\n";
print "                       [--multiline | --name-only]\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.004 ]--