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


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

=head1 list-mysql-servers.pl

Lists all registered remote MySQL servers.

This command lists all registered MySQL servers that can be used for remote
database hosting. Use the C<--name-only> flag to just list hostnames, or 
C<--multiline> to show full details of each server.

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

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

if ($multi) {
    # Show full details
    foreach $m (@mods) {
        print $m->{'minfo'}->{'dir'},"\n";
        print "    Description: ",&html_tags_to_text($m->{'desc'}),"\n";
        if ($m->{'config'}->{'sock'}) {
            print "    Socket: ",$m->{'config'}->{'sock'},"\n";
            }
        if ($m->{'config'}->{'host'}) {
            print "    Host: ",$m->{'config'}->{'host'},"\n";
            }
        if ($m->{'config'}->{'port'}) {
            print "    Port: ",$m->{'config'}->{'port'},"\n";
            }
        }
    }
elsif ($nameonly) {
    # Just module names
    foreach $m (@mods) {
        print $m->{'minfo'}->{'dir'},"\n";
        }
    }
else {
    # One per line
    $fmt = "%-30.30s %-30.30s %-10.10s\n";
    printf $fmt, "Module", "Host", "Port";
    printf $fmt, ("-" x 30), ("-" x 30), ("-" x 10);
    foreach $m (@mods) {
        printf $fmt, $m->{'minfo'}->{'dir'},
                 $m->{'config'}->{'host'} ||
                   $m->{'config'}->{'sock'} ||
                   'localhost',
                 $m->{'config'}->{'port'} || 3306;
        }
    }

sub usage
{
print "$_[0]\n\n" if ($_[0]);
print "Lists all registered remote MySQL servers.\n";
print "\n";
print "virtualmin list-mysql-servers [--multiline]\n";
print "                              [--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.0031 ]--